public
Description: JSON parser/encoder for Lua Parses JSON using LPEG for speed and flexibility. Depending on parser/encoder options, various values are preserved as best as possible.
Homepage: http://www.eharning.us/wiki/luajson/
Clone URL: git://github.com/harningt/luajson.git
Click here to lend your support to: luajson and make a donation at www.pledgie.com !
name age message
file LICENSE Thu Jul 24 22:21:01 -0700 2008 Management: Added LICENSE and README, applied l... [harningt]
file Makefile Mon Mar 16 20:22:24 -0700 2009 moved lua sources into 'lua' to assist luarocks... [harningt]
file README Tue Aug 05 21:25:57 -0700 2008 base: Noted lunit 0.4 requirement [harningt]
file ReleaseNotes.txt Fri Jun 12 20:19:12 -0700 2009 docs: documents 1.0 release [harningt]
directory docs/ Fri Jun 12 20:19:12 -0700 2009 docs: documents 1.0 release [harningt]
directory lua/ Tue Jun 23 21:56:57 -0700 2009 decoder: adds support for caching new arbitrary... [harningt]
directory rockspecs/ Fri Jun 12 20:24:58 -0700 2009 base: rockspec 1.0-1 final tagging [harningt]
directory tests/ Tue Jun 23 21:47:36 -0700 2009 tests: tests added for simple/default decoders ... [harningt]
directory util/ Fri Jun 12 20:17:39 -0700 2009 base: adds utility to help construct lua rocks [harningt]
README
LuaJSON
  JSON Parser/Constructor for Lua

Author:  Thomas Harning Jr. <harningt@gmail.com>

Requirements
  Lua 5.1
  LPeg (Tested with 0.7, 0.8 ... 0.6 should work)
  For regressionTest:
    lfs (Tested with 1.4.1)
  For lunit-tests:
    lunit >= 0.4

License
  All-but tests: MIT-style, See LICENSE for details
  tests/*:       Public Domain / MIT - whichever is least restrictive

Module/Function overview:
  json.encode (callable module referencing json.encode.encode)
  --encode ( value : ANY-valid )

    Takes in a JSON-encodable value and returns the JSON-encoded text
    Valid input types:
      table
      array-like table (spec below)
      string
      number
      boolean
      'null' - represented by json.util.null
    Table keys (string,number,boolean) are encoded as strings, others are erroneus
    Table values are any valid input-type
    Array-like tables are converted into JSON arrays...
      Position 1 maps to JSON Array position 0
  --isEncodable ( value : ANY )
    Returns a boolean stating whether is is encodeable or not
    NOTE: Tables/arrays are not deeply inspected

  json.decode (callable module referencing json.decode.decode)
  --decode  (data : string, strict : optional boolean)
    Takes in a string of JSON data and converts it into a Lua object
    If 'strict' is set, then the strict JSON rule-set is used

  json.util
  --printValue (tab : ANY, name : string)
      recursively prints out all object values - if duplicates found, reference printed
  --null
      Reference value to represent 'null' in a well-defined way to
      allow for null values to be inserted into an array/table

Attribution:
  parsing test suite from JSON_checker project of http://www.json.org/
  No listed license for these files in their package.