webmcp
diff libraries/json/json.c @ 194:654ddbcc49d0
Bugfix in autodoc.lua; Added documentation for JSON library; json.import(...) returns json.null for "null" on top-level
author | jbe |
---|---|
date | Mon Aug 11 17:38:12 2014 +0200 (2014-08-11) |
parents | 0014a7c22013 |
children | 9fd7e1bf9fe3 |
line diff
1.1 --- a/libraries/json/json.c Mon Aug 11 13:18:49 2014 +0200 1.2 +++ b/libraries/json/json.c Mon Aug 11 17:38:12 2014 +0200 1.3 @@ -551,16 +551,8 @@ 1.4 } else if (!strncmp(str+pos, "null", 4)) { 1.5 // consume 4 input characters for "null": 1.6 pos += 4; 1.7 - // different behavor for top-level and sub-levels: 1.8 - if (level) { 1.9 - // if sub-level, 1.10 - // push special null-marker onto stack: 1.11 - json_pushnullmark(L); 1.12 - } else { 1.13 - // if top-level, 1.14 - // push nil onto stack: 1.15 - lua_pushnil(L); 1.16 - } 1.17 + // push special null-marker onto stack: 1.18 + json_pushnullmark(L); 1.19 } else { 1.20 // all other cases are a syntax error: 1.21 goto json_import_syntax_error;