Ejemplo n.º 1
0
        public static string ToJSONString(this IParsableJSONListElement inElement)
        {
            Dictionary <string, object> data = inElement.ToDict();

            if (data != null)
            {
                return(MiniJsonTRExtensions.toJson(data));
            }

            return("");
        }
Ejemplo n.º 2
0
        public static bool FromJSONString(this IParsableJSONListElement inElement, string inJSONString)
        {
            if (string.IsNullOrEmpty(inJSONString) == false)
            {
                Dictionary <string, object> JSONDict = MiniJsonTRExtensions.dictionaryFromJson(inJSONString);
                if (JSONDict != null)
                {
                    return(inElement.FromDict(JSONDict));
                }
            }

            return(false);
        }