Assets/Watson/Scripts/Utilities/Config.cs
/// <summary>
/// Save this COnfig into JSON.
/// </summary>
/// <param name="pretty">If true, then the json data will be formatted for readability.</param>
/// <returns></returns>
Save this COnfig into JSON.
Save this COnfig into JSON .
public string SaveConfig(bool pretty = true)
        {
            fsData data = null;
            sm_Serializer.TrySerialize(GetType(), this, out data);
            if (!System.IO.Directory.Exists(Application.streamingAssetsPath))
                System.IO.Directory.CreateDirectory(Application.streamingAssetsPath);
            if (pretty)
                return fsJsonPrinter.PrettyJson(data);
            return fsJsonPrinter.CompressedJson(data);
        }
public string SaveConfig ( bool pretty = true ) { fsData data = null ; sm_Serializer . TrySerialize ( GetType ( ) , this , out data ) ; if ( ! System . IO . Directory . Exists ( Application . streamingAssetsPath ) ) System . IO . Directory . CreateDirectory ( Application . streamingAssetsPath ) ; if ( pretty ) return fsJsonPrinter . PrettyJson ( data ) ; return fsJsonPrinter . CompressedJson ( data ) ; }
Save this COnfig into JSON.
Save this COnfig into JSON .
None
pretty
bool
If true, then the json data will be formatted for readability.
If true then the json data will be formatted for readability .