Braces in a JSON string cause VRCJson to fail deserialization
TeaVirus
This was reported as fixed in 2024.4.1p3 but it looks like the problem crept back in and exists in SDK 3.8.2 / 2025.3.1 (haven't tested any other versions). Since the previous canny was closed out as complete, thought I'd open a new one.
Prior bug report on this issue:
// This works
if(VRCJson.TryDeserializeFromJson("\"{\"data\":\"test\"}", out DataToken token2))
Debug.LogError("Failed to deserialize JSON");
else
Debug.Log("Successfully deserialized JSON");
// This fails. Only difference is the braces after the word test in the JSON string. Number of braces or their configuration doesn't seem to make a difference.
if(VRCJson.TryDeserializeFromJson("{\"data\":\"test{}\"}", out DataToken token1))
Debug.LogError("Failed to deserialize JSON");
else
Debug.Log("Successfully deserialized JSON");
Thanks! -Tea
Log In