예제 #1
0
 List <(string name, object value)> ReadJSonObject(
     JsonTextReader reader,
     List <string> path,
     ref string lastPropertyName,
     AddObjectDelegate addObjectDelegate     = null,
     AddPropertyDelegate addPropertyDelegate = null,
     DebugDelegate debugDelegate             = null
     )
 {
예제 #2
0
        public List <(string name, object value)> ReadJSonObjectFromText(
            string text,
            AddObjectDelegate addObjectDelegate     = null,
            AddPropertyDelegate addPropertyDelegate = null,
            DebugDelegate debugDelegate             = null
            )
        {
            using var textReader = new StringReader(text);
            var    reader           = new JsonTextReader(textReader);
            var    varpath          = new List <string>();
            string lastPropertyName = "";

            return(ReadJSonObject(
                       reader,
                       varpath,
                       ref lastPropertyName,
                       addObjectDelegate,
                       addPropertyDelegate,
                       debugDelegate
                       ));
        }
예제 #3
0
        public List <(string name, object value)> ReadJSonObjectFromFile(
            string path,
            AddObjectDelegate addObjectDelegate     = null,
            AddPropertyDelegate addPropertyDelegate = null,
            DebugDelegate debugDelegate             = null
            )
        {
            using var fileReader = File.OpenText(path);
            var    reader           = new JsonTextReader(fileReader);
            var    varpath          = new List <string>();
            string lastPropertyName = "";

            return(ReadJSonObject(
                       reader,
                       varpath,
                       ref lastPropertyName,
                       addObjectDelegate,
                       addPropertyDelegate,
                       debugDelegate
                       ));
        }