diff options
author | Mark Pulford <mark@kyne.com.au> | 2012-01-02 12:41:46 +1030 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2012-01-02 12:41:46 +1030 |
commit | 966f5d337d1c05446736dca220414db308e1f852 (patch) | |
tree | 9c93b7b16c11e8da54db821e0ded197306dc4018 | |
parent | 15c99923b1a38404666a10596da5daa032f1c39c (diff) | |
download | lua-cjson-966f5d337d1c05446736dca220414db308e1f852.tar.gz lua-cjson-966f5d337d1c05446736dca220414db308e1f852.tar.bz2 lua-cjson-966f5d337d1c05446736dca220414db308e1f852.zip |
Fix typos (lists, hexadecimal)
-rw-r--r-- | lua_cjson.c | 4 | ||||
-rw-r--r-- | manual.txt | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lua_cjson.c b/lua_cjson.c index ca85156..708e695 100644 --- a/lua_cjson.c +++ b/lua_cjson.c | |||
@@ -332,7 +332,7 @@ static void json_enum_option(lua_State *l, const char **options, | |||
332 | } | 332 | } |
333 | 333 | ||
334 | 334 | ||
335 | /* When enabled, rejects: NaN, Infinity, hexidecimal numbers */ | 335 | /* When enabled, rejects: NaN, Infinity, hexadecimal numbers */ |
336 | static int json_cfg_refuse_invalid_numbers(lua_State *l) | 336 | static int json_cfg_refuse_invalid_numbers(lua_State *l) |
337 | { | 337 | { |
338 | static const char *options_enc_dec[] = { "none", "encode", "decode", | 338 | static const char *options_enc_dec[] = { "none", "encode", "decode", |
@@ -929,7 +929,7 @@ static void json_next_string_token(json_parse_t *json, json_token_t *token) | |||
929 | * json_next_number_token() uses strtod() which allows other forms: | 929 | * json_next_number_token() uses strtod() which allows other forms: |
930 | * - numbers starting with '+' | 930 | * - numbers starting with '+' |
931 | * - NaN, -NaN, infinity, -infinity | 931 | * - NaN, -NaN, infinity, -infinity |
932 | * - hexidecimal numbers | 932 | * - hexadecimal numbers |
933 | * - numbers with leading zeros | 933 | * - numbers with leading zeros |
934 | * | 934 | * |
935 | * json_is_invalid_number() detects "numbers" which may pass strtod()'s | 935 | * json_is_invalid_number() detects "numbers" which may pass strtod()'s |
@@ -169,10 +169,10 @@ buffer is not shared. This can be achieved by one of the following | |||
169 | methods: | 169 | methods: |
170 | 170 | ||
171 | - Disabling the persistent encoding buffer with | 171 | - Disabling the persistent encoding buffer with |
172 | +cjson.encode_keep_buffer+. | 172 | +cjson.encode_keep_buffer+ |
173 | - Ensuring each thread calls +cjson.encode+ at a time. | 173 | - Ensuring each thread calls +cjson.encode+ at a time |
174 | - Using a separate +cjson+ module table per pre-emptive thread | 174 | - Using a separate +cjson+ module table per pre-emptive thread |
175 | (+cjson.new+). | 175 | (+cjson.new+) |
176 | 176 | ||
177 | [NOTE] | 177 | [NOTE] |
178 | Lua CJSON uses ++strtod++(3) and ++snprintf++(3) to perform numeric | 178 | Lua CJSON uses ++strtod++(3) and ++snprintf++(3) to perform numeric |
@@ -208,7 +208,7 @@ JSON +null+ will be converted to a NULL +lightuserdata+ value. This | |||
208 | can be compared with +cjson.null+ for convenience. | 208 | can be compared with +cjson.null+ for convenience. |
209 | 209 | ||
210 | By default, numbers incompatible with the JSON specification (NaN, | 210 | By default, numbers incompatible with the JSON specification (NaN, |
211 | Infinity, Hexidecimal) can be decoded. This default can be changed | 211 | Infinity, Hexadecimal) can be decoded. This default can be changed |
212 | with +cjson.refuse_invalid_numbers+. | 212 | with +cjson.refuse_invalid_numbers+. |
213 | 213 | ||
214 | .Example: Decoding | 214 | .Example: Decoding |
@@ -287,8 +287,8 @@ on sparse array handling. | |||
287 | 287 | ||
288 | Lua CJSON does not use metamethods when serialising tables. | 288 | Lua CJSON does not use metamethods when serialising tables. |
289 | 289 | ||
290 | - +rawget+ is used to iterate over Lua arrays. | 290 | - +rawget+ is used to iterate over Lua arrays |
291 | - +next+ is used to iterate over Lua objects. | 291 | - +next+ is used to iterate over Lua objects |
292 | 292 | ||
293 | JSON object keys are always strings. +cjson.encode+ can only handle | 293 | JSON object keys are always strings. +cjson.encode+ can only handle |
294 | table keys which are type +number+ or +string+. All other types will | 294 | table keys which are type +number+ or +string+. All other types will |
@@ -302,7 +302,7 @@ This may not be required by some applications. | |||
302 | 302 | ||
303 | By default, the following Lua values will generate errors: | 303 | By default, the following Lua values will generate errors: |
304 | 304 | ||
305 | - Numbers incompatible with the JSON specification (NaN, Infinity, Hexidecimal) | 305 | - Numbers incompatible with the JSON specification (NaN, Infinity, Hexadecimal) |
306 | - Tables nested more than 20 levels deep | 306 | - Tables nested more than 20 levels deep |
307 | - Excessively sparse Lua arrays | 307 | - Excessively sparse Lua arrays |
308 | 308 | ||