diff options
Diffstat (limited to 'manual.txt')
-rw-r--r-- | manual.txt | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -290,7 +290,7 @@ Lua CJSON may generate an error when trying to decode numbers not | |||
290 | supported by the JSON specification. _Invalid numbers_ are defined as: | 290 | supported by the JSON specification. _Invalid numbers_ are defined as: |
291 | 291 | ||
292 | - infinity | 292 | - infinity |
293 | - not-a-number (NaN) | 293 | - NaN |
294 | - hexadecimal | 294 | - hexadecimal |
295 | 295 | ||
296 | Available settings: | 296 | Available settings: |
@@ -438,12 +438,13 @@ Lua CJSON may generate an error when encoding floating point numbers not | |||
438 | supported by the JSON specification (_invalid numbers_): | 438 | supported by the JSON specification (_invalid numbers_): |
439 | 439 | ||
440 | - infinity | 440 | - infinity |
441 | - not-a-number (NaN) | 441 | - NaN |
442 | 442 | ||
443 | Available settings: | 443 | Available settings: |
444 | 444 | ||
445 | +true+:: Allow _invalid numbers_ to be encoded. This will generate | 445 | +true+:: Allow _invalid numbers_ to be encoded using the Javascript |
446 | non-standard JSON, but this output is supported by some libraries. | 446 | compatible values +NaN+ and +Infinity+. This will generate |
447 | non-standard JSON, but these values are supported by some libraries. | ||
447 | +"null"+:: Encode _invalid numbers_ as a JSON +null+ value. This allows | 448 | +"null"+:: Encode _invalid numbers_ as a JSON +null+ value. This allows |
448 | infinity and NaN to be encoded into valid JSON. | 449 | infinity and NaN to be encoded into valid JSON. |
449 | +false+:: Throw an error when attempting to encode _invalid numbers_. | 450 | +false+:: Throw an error when attempting to encode _invalid numbers_. |