After Aries sent me this blog post
I decided to check VRCJson against a popular test suite.
I found too many issues to include in one post, so I'll be focusing on what I think is most important.
The fact that exceptions can bubble up from "Try" methods and crash UdonBehaviours pretty much completely defeats the entire purpose of "Try".
Here are three cases where this happens:
["a
=
IndexOutOfRangeException: Index was outside the bounds of the array.
[]
=
IndexOutOfRangeException: Index was outside the bounds of the array.
{"a":"b","a":"c"}
=
ArgumentException: An item with the same key has already been added. Key: a
Please just return false instead of crashing the behaviour.
If you want to do more than that then you could solve pretty much all the issues with VRCJson by internally using a real RFC 8259 compliant JSON parser and then handle boxing to and from DataToken when it leaves or enters Udon.