diff options
author | Mark Pulford <mark@kyne.com.au> | 2012-01-02 06:11:46 +0400 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2012-01-02 06:11:46 +0400 |
commit | 966f5d337d1c05446736dca220414db308e1f852 (patch) | |
tree | 9c93b7b16c11e8da54db821e0ded197306dc4018 | |
parent | 15c99923b1a38404666a10596da5daa032f1c39c (diff) |
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, } -/* When enabled, rejects: NaN, Infinity, hexidecimal numbers */ +/* When enabled, rejects: NaN, Infinity, hexadecimal numbers */ static int json_cfg_refuse_invalid_numbers(lua_State *l) { 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) * json_next_number_token() uses strtod() which allows other forms: * - numbers starting with '+' * - NaN, -NaN, infinity, -infinity - * - hexidecimal numbers + * - hexadecimal numbers * - numbers with leading zeros * * 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 methods: - Disabling the persistent encoding buffer with - +cjson.encode_keep_buffer+. -- Ensuring each thread calls +cjson.encode+ at a time. + +cjson.encode_keep_buffer+ +- Ensuring each thread calls +cjson.encode+ at a time - Using a separate +cjson+ module table per pre-emptive thread - (+cjson.new+). + (+cjson.new+) [NOTE] 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 can be compared with +cjson.null+ for convenience. By default, numbers incompatible with the JSON specification (NaN, -Infinity, Hexidecimal) can be decoded. This default can be changed +Infinity, Hexadecimal) can be decoded. This default can be changed with +cjson.refuse_invalid_numbers+. .Example: Decoding @@ -287,8 +287,8 @@ on sparse array handling. Lua CJSON does not use metamethods when serialising tables. -- +rawget+ is used to iterate over Lua arrays. -- +next+ is used to iterate over Lua objects. +- +rawget+ is used to iterate over Lua arrays +- +next+ is used to iterate over Lua objects JSON object keys are always strings. +cjson.encode+ can only handle table keys which are type +number+ or +string+. All other types will @@ -302,7 +302,7 @@ This may not be required by some applications. By default, the following Lua values will generate errors: -- Numbers incompatible with the JSON specification (NaN, Infinity, Hexidecimal) +- Numbers incompatible with the JSON specification (NaN, Infinity, Hexadecimal) - Tables nested more than 20 levels deep - Excessively sparse Lua arrays |