[0.18.28] Space breaks json parse
Posted: Sat May 30, 2020 4:33 pm
Found a small bug with game.json_to_table.
Adding a space after a comma or near the brackets stops the parser. Note a space after a colon has no effect.
It would be nice if we could be allowed a space after the comma so it is more human readable.
Adding a space after a comma or near the brackets stops the parser. Note a space after a colon has no effect.
It would be nice if we could be allowed a space after the comma so it is more human readable.
Code: Select all
game.json_to_table('{"foo":[1,2,3],"bar":[1,2,3]}') -- returns { foo = { 1,2,3 }, bar = { 1,2,3 } }
game.json_to_table('{"foo": [1,2,3],"bar": [1,2,3]}') -- returns { foo = { 1,2,3 }, bar = { 1,2,3 } }
game.json_to_table('{"foo": [1,2,3], "bar": [1,2,3]}') -- returns nil
game.json_to_table('{ "foo": [1,2,3],"bar": [1,2,3] }') -- returns nil