1
0
Fork 0

Updated point in Notes section

master
rxi 2015-08-30 19:21:05 +01:00
parent 9fbfcde195
commit cd8ecd34e3
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ json.decode('[1,2,3,{"x":10}]') -- Returns { 1, 2, 3, { x = 10 } }
``` ```
## Notes ## Notes
* Tables with the key `1` set are treated as arrays when encoding * Trying to encode values which are unrepresentable in JSON will never result
in type conversion or other magic: sparse arrays, tables with mixed keys or
invalid numbers (NaN, -inf, inf) will raise an error
* `null` values contained within an array or object are converted to `nil` and * `null` values contained within an array or object are converted to `nil` and
are therefore lost upon decoding are therefore lost upon decoding
* *Pretty* encoding is not supported, `json.encode()` only encodes to a compact * *Pretty* encoding is not supported, `json.encode()` only encodes to a compact