Using MiniJSON in Unity to serialize.
Want to have good looking JSON, not one-liner.
I know, that JsonUtility allows to make pretty printing, but when I am using it I have empty JSON:
using (StreamWriter writer = new StreamWriter(savePath))
{
writer.WriteLine(JsonUtility.ToJson(settings, true));
}
and have this:
{}
Code has been used with MiniJSON is:
using (StreamWriter writer = new StreamWriter(savePath))
{
writer.WriteLine(MiniJSON.Json.Serialize(settings));
}
and the result is a normal one-liner JSON.
Can I use Pretty printing with MiniJSON and how?