コード例 #1
0
ファイル: fsJsonParser.cs プロジェクト: x4maT/fullserializer
        /// <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);
        }
コード例 #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));
        }
コード例 #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);
 }
コード例 #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));
        }