json.lua
json.lua copied to clipboard
Bug with encoding hex characters with letters
The line: local testStr = jsonLua.encode("\x03test\x7a") Outputs: "\u0003testz"
The first HEX charater is converted correctly, the second one isn't. If I make the second one a HEX only consisting of a number it converts correctly. It doesn't matter if you use upper or lower case, alphanumerics in the HEX character doesn't seem to work.
It seems to work up to 1F. Is it only escaping control characters? Probably design choice then.