private static JSONConverters jsonconvcache; //cache it public string ToShortString(string additionalremoves = null, JSONConverters jc = null) { if (jc == null) { if (jsonconvcache == null) { jsonconvcache = StandardConverters(); } jc = jsonconvcache; } JSONPrettyPrint jpp = new JSONPrettyPrint(jc, DefaultRemoveItems() + ((additionalremoves != null) ? (";" + additionalremoves) : ""), "_Localised", EventTypeStr); return(jpp.PrettyPrint(EventDataString, 80)); }
// ================================================================================= // Export // --------------------------------------------------------------------------------- public static void Export(iCS_VisualScriptData storage, string path) { var root = new JObject(new JNameValuePair("Storage", JValue.Build(storage))); File.WriteAllText(path, JSONPrettyPrint.Print(root.Encode())); }