diff options
| author | Mark Pulford <mark@kyne.com.au> | 2011-12-20 23:42:12 +1030 |
|---|---|---|
| committer | Mark Pulford <mark@kyne.com.au> | 2011-12-20 23:42:12 +1030 |
| commit | b4f1c4a7bcc306286ada61f6ecf2c78ef4cffa67 (patch) | |
| tree | 90658283b0124ed7f864ebb118a01c9420258330 | |
| parent | 4f0b8d47af36dcd7cc1c41f3314805265250aa95 (diff) | |
| download | lua-cjson-b4f1c4a7bcc306286ada61f6ecf2c78ef4cffa67.tar.gz lua-cjson-b4f1c4a7bcc306286ada61f6ecf2c78ef4cffa67.tar.bz2 lua-cjson-b4f1c4a7bcc306286ada61f6ecf2c78ef4cffa67.zip | |
Clarify optional args and return values
Diffstat (limited to '')
| -rw-r--r-- | manual.txt | 15 |
1 files changed, 15 insertions, 0 deletions
| @@ -304,6 +304,9 @@ not freed until the Lua CJSON module is garbage collected. Setting this | |||
| 304 | option to +false+ will cause the buffer to be freed after each call to | 304 | option to +false+ will cause the buffer to be freed after each call to |
| 305 | +cjson.encode+. | 305 | +cjson.encode+. |
| 306 | 306 | ||
| 307 | This setting is only changed when an argument is provided. The current | ||
| 308 | setting is always returned. | ||
| 309 | |||
| 307 | 310 | ||
| 308 | [[encode_max_depth]] | 311 | [[encode_max_depth]] |
| 309 | encode_max_depth | 312 | encode_max_depth |
| @@ -318,6 +321,9 @@ depth = cjson.encode_max_depth([depth]) | |||
| 318 | By default, Lua CJSON will reject data structure with more than 20 nested | 321 | By default, Lua CJSON will reject data structure with more than 20 nested |
| 319 | tables. | 322 | tables. |
| 320 | 323 | ||
| 324 | This setting is only changed when an argument is provided. The current | ||
| 325 | setting is always returned. | ||
| 326 | |||
| 321 | This check prevents a deeply nested or recursive data structure from | 327 | This check prevents a deeply nested or recursive data structure from |
| 322 | crashing the application. | 328 | crashing the application. |
| 323 | 329 | ||
| @@ -340,6 +346,9 @@ precision = cjson.encode_number_precision([precision]) | |||
| 340 | By default, Lua CJSON will output 14 significant digits when | 346 | By default, Lua CJSON will output 14 significant digits when |
| 341 | converting a number to text. | 347 | converting a number to text. |
| 342 | 348 | ||
| 349 | This setting is only changed when an argument is provided. The current | ||
| 350 | setting is always returned. | ||
| 351 | |||
| 343 | Reducing number precision to _3_ can improve performance of number | 352 | Reducing number precision to _3_ can improve performance of number |
| 344 | heavy JSON conversions by up to 50%. | 353 | heavy JSON conversions by up to 50%. |
| 345 | 354 | ||
| @@ -360,6 +369,9 @@ Lua CJSON classifies Lua tables into 3 types when encoding as a JSON | |||
| 360 | array. This is determined by the number of values missing for keys up | 369 | array. This is determined by the number of values missing for keys up |
| 361 | to the maximum index: | 370 | to the maximum index: |
| 362 | 371 | ||
| 372 | Each particular setting is only changed when that argument is | ||
| 373 | provided. The current settings are always returned. | ||
| 374 | |||
| 363 | [horizontal] | 375 | [horizontal] |
| 364 | Normal:: All values are available. | 376 | Normal:: All values are available. |
| 365 | Sparse:: At least 1 value is missing. | 377 | Sparse:: At least 1 value is missing. |
| @@ -410,6 +422,9 @@ specification (_invalid numbers_): | |||
| 410 | By default Lua CJSON will decode _invalid numbers_, but will refuse to | 422 | By default Lua CJSON will decode _invalid numbers_, but will refuse to |
| 411 | encode them. | 423 | encode them. |
| 412 | 424 | ||
| 425 | This setting is only changed when an argument is provided. The current | ||
| 426 | setting is always returned. | ||
| 427 | |||
| 413 | This setting can be configured separately for encoding and/or | 428 | This setting can be configured separately for encoding and/or |
| 414 | decoding: | 429 | decoding: |
| 415 | 430 | ||
