Phrogz / NeatJSON

Pretty-print your JSON in Ruby, JS, or Lua with more power than JSON.stringify or JSON.pretty_generate
http://phrogz.net/JS/NeatJSON
MIT License
108 stars 19 forks source link

Multiline Lua output incorrectly quotes keys #29

Closed Phrogz closed 5 years ago

Phrogz commented 5 years ago
local n = require('neatjson')

t = {foo=1, bar=2}

print(n(t, {lua=true, wrap=false}))
--> {foo=1,bar=2}

print(n(t, {lua=true, wrap=true}))
--> {
-->   "foo"=1,
-->   "bar"=2
--> }