Beispiel #1
0
        public void SetFieldsKeys(string JsonString)
        {
            var json            = JToken.Parse(JsonString);
            var fieldsCollector = new JsonFieldsCollector(json);
            var fields          = fieldsCollector.GetAllFields();


            foreach (var field in fields)
            {
                fieldsKeys.Add(field.Key);
            }
        }
Beispiel #2
0
        public static string AllJsonFieldsDisplay(string JsonString)
        {
            var    json            = JToken.Parse(JsonString);
            var    fieldsCollector = new JsonFieldsCollector(json);
            var    fields          = fieldsCollector.GetAllFields();
            string txt             = "";

            foreach (var field in fields)
            {
                txt += ($"{field.Key}: '{field.Value}'\r\n");
            }
            return(txt);
        }