webmcp

changeset 195:31f775ea5e24

Fix in JSON documentation
author jbe
date Mon Aug 11 17:41:40 2014 +0200 (2014-08-11)
parents 654ddbcc49d0
children ce8fd7767b38
files libraries/json/json.autodoc.lua
line diff
     1.1 --- a/libraries/json/json.autodoc.lua	Mon Aug 11 17:38:12 2014 +0200
     1.2 +++ b/libraries/json/json.autodoc.lua	Mon Aug 11 17:41:40 2014 +0200
     1.3 @@ -81,13 +81,13 @@
     1.4  
     1.5  
     1.6  --[[--
     1.7 -type_string_or_nil  -- "object", "array", "string", "number", "boolean", "null", string "nil", or nil
     1.8 -json.get(
     1.9 -  document,         -- a JSON value (usually object or array)
    1.10 -  key1,             -- first path element (e.g. a string key to descent into an object)
    1.11 -  key2,             -- second path element (e.g. an integer key to descent into an array)
    1.12 +type_string_or_nil =  -- "object", "array", "string", "number", "boolean", "null", string "nil", or nil
    1.13 +json.type(
    1.14 +  document,           -- a JSON value (usually object or array)
    1.15 +  key1,               -- first path element (e.g. a string key to descent into an object)
    1.16 +  key2,               -- second path element (e.g. an integer key to descent into an array)
    1.17    ...,
    1.18 -  last_key          -- last path element
    1.19 +  last_key            -- last path element
    1.20  )
    1.21  
    1.22  Determines the type of a value in a JSON document by following a given path that may contain string keys (to descent into an object) or integer keys (to descent into an array). If the path but its last path element could be followed, then the string "nil" is returned. If the previous path elements could not be followed, then nil itself is returned. Otherwise the type of the value is returned, whereas the string "null" indicates a JSON null value. This function also works on plain Lua tables instead of JSON documents.

Impressum / About Us