VRCJson breaks if a byte order mark is present in the json
complete
ballfun
When trying to load a JSON via stringLoader and the file happens to be encoded with UTF8-DOM (maybe other encoding too) it will also bring along the DOM byte (u+FEFF) in the string. When trying to pass that into VRCJson.TryDeserializeFromJson it will return false and fail to deserialize
Reproduction: 1.Create a json with the encoding UTF8-DOM and put in a valid json
2.upload it where
3.try to load it and deserialize it with VRCStringDownloader.LoadUrl and VRCJson.TryDeserializeFromJson
Expected results: The json will deserialized properly
Actual results: VRCJson.TryDeserializeFromJson will return false with the error token TypeUnsupported: Unable to Deserialize from Json: Root object must be a list or dictionary, was Invalid instead
currently this can be get around with resultString.Replace("\uFEFF", ""); before putting it into VRCJson
Log In
Phasedragon
complete
Fixed in 2024.4.1p3