Example #1
0
        /// <summary>
        /// Parses the specified input. Returns a failure state if parsing failed.
        /// </summary>
        /// <param name="input">The input to parse.</param>
        /// <param name="data">The parsed data. This is undefined if parsing fails.</param>
        /// <returns>The parsed input.</returns>
        public static fsResult Parse(string input, out fsData data)
        {
            if (string.IsNullOrEmpty(input)) {
                data = default(fsData);
                return fsResult.Fail("No input");
            }

            var context = new fsJsonParser(input);
            return context.RunParse(out data);
        }
Example #2
0
        /// <summary>
        ///     Parses the specified input. Returns a failure state if parsing failed.
        /// </summary>
        /// <param name="input">The input to parse.</param>
        /// <param name="data">The parsed data. This is undefined if parsing fails.</param>
        /// <returns>The parsed input.</returns>
        public static fsResult Parse(string input, out fsData data)
        {
            if (string.IsNullOrEmpty(input))
            {
                data = default(fsData);
                return(fsResult.Fail("No input"));
            }

            fsJsonParser context = new fsJsonParser(input);

            return(context.RunParse(out data));
        }
Example #3
0
 /// <summary>
 /// Parses the specified input. Returns a failure state if parsing failed.
 /// </summary>
 /// <param name="input">The input to parse.</param>
 /// <param name="data">The parsed data. This is undefined if parsing fails.</param>
 /// <returns>The parsed input.</returns>
 public static fsResult Parse(string input, out fsData data)
 {
     var context = new fsJsonParser(input);
     return context.RunParse(out data);
 }
Example #4
0
        /// <summary>
        /// Parses the specified input. Returns a failure state if parsing failed.
        /// </summary>
        /// <param name="input">The input to parse.</param>
        /// <param name="data">The parsed data. This is undefined if parsing fails.</param>
        /// <returns>The parsed input.</returns>
        public static fsResult Parse(string input, out fsData data)
        {
            var context = new fsJsonParser(input);

            return(context.RunParse(out data));
        }