Minify option in VRCJson does not format to minimum.
available in future release
ureishi
When serializing in VRCJson with JsonExportType set to Minify, the output contains unnecessary whitespace.
To save data size, it would be better if no whitespace was included when Minify is specified.
var j = new DataDictionary();
j["e1"] = 1; j["e2"] = 2;
if (VRCJson.TrySerializeToJson(j, JsonExportType.Minify, out var res))
{
Debug.Log(res);
}
Result:
{"e1": 1, "e2": 2}
Log In
This post was marked as
available in future release
のりたま(NORITAMA)
I encountered this issue when serializing a DataDictionary with VRCJson and synchronizing strings (World SDK 3.8.2).
In my test case, about 10% of the Minify JSON string was this unnecessary space, and removing it would reduce the amount of synchronized data.
Since properly removing spaces from JSON strings with Udon requires consideration of "spaces in strings enclosed in double quotes," it would be very helpful if the Minify option could remove the spaces.
BobyStar
This is still the case with SDK 3.7.5.
Fax
interested
This sounds like it could be useful! Thank you for the suggestion.