decoder/tests: fixes ambiguous/invalid hex numbers with decimal/scientific format
[luajson.git] / README
blob8cd56f92a3c171ce238ea6790e2fa7d42829bf37
1 LuaJSON
2         JSON Parser/Constructor for Lua
4 Author: Thomas Harning Jr. <harningt@gmail.com>
6 Requirements
7         Lua 5.1
8         LPeg (Tested with 0.7, 0.8 ... 0.6 should work)
9         For regressionTest:
10                 lfs (Tested with 1.4.1)
11         For lunit-tests:
12                 lunit >= 0.4
14 License
15         All-but tests: MIT-style, See LICENSE for details
16         tests/*:       Public Domain / MIT - whichever is least restrictive
18 Module/Function overview:
19         json.encode (callable module referencing json.encode.encode)
20         --encode ( value : ANY-valid )
22                 Takes in a JSON-encodable value and returns the JSON-encoded text
23                 Valid input types:
24                         table
25                         array-like table (spec below)
26                         string
27                         number
28                         boolean
29                         'null' - represented by json.util.null
30                 Table keys (string,number,boolean) are encoded as strings, others are erroneus
31                 Table values are any valid input-type
32                 Array-like tables are converted into JSON arrays...
33                         Position 1 maps to JSON Array position 0
34         --isEncodable ( value : ANY )
35                 Returns a boolean stating whether is is encodeable or not
36                 NOTE: Tables/arrays are not deeply inspected
38         json.decode (callable module referencing json.decode.decode)
39         --decode        (data : string, strict : optional boolean)
40                 Takes in a string of JSON data and converts it into a Lua object
41                 If 'strict' is set, then the strict JSON rule-set is used
43         json.util
44         --printValue (tab : ANY, name : string)
45                         recursively prints out all object values - if duplicates found, reference printed
46         --null
47                         Reference value to represent 'null' in a well-defined way to
48                         allow for null values to be inserted into an array/table
50 Attribution:
51         parsing test suite from JSON_checker project of http://www.json.org/
52         No listed license for these files in their package.