cgltf doesn't decode encoded json strings, leaving escaped characters (some whitespace, unicode codepoints, etc.) in names. I've implemented this outside of cgltf, but I feel like this is inherently a library task to deal with the underlying format's string encoding.
Would you accept a PR that adds a function to perform the string decoding? This would be an entirely optional function to use in-place (similar to cgltf_decode_uri) on user-facing strings (mostly names and URIs). The glTF spec guarantees that a valid glTF file doesn't use encoded strings for keys and enums, so no changes needed to parsing code.
:wave:
cgltf doesn't decode encoded json strings, leaving escaped characters (some whitespace, unicode codepoints, etc.) in names. I've implemented this outside of cgltf, but I feel like this is inherently a library task to deal with the underlying format's string encoding.
Would you accept a PR that adds a function to perform the string decoding? This would be an entirely optional function to use in-place (similar to
cgltf_decode_uri
) on user-facing strings (mostly names and URIs). The glTF spec guarantees that a valid glTF file doesn't use encoded strings for keys and enums, so no changes needed to parsing code.For reference, the allowed escape characters: