github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

harningt / luajson

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 11
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (12)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • 1.0.x
    • master ✓
  • Tags (12)
    • pre-1.0
    • debian/0.10-1
    • 1.1.1
    • 1.1
    • 1.0.2
    • 1.0.1
    • 1.0
    • 0.10
    • 0.9.1
    • 0.9
    • 0.6
    • 0.5
Sending Request…
Click here to lend your support to: luajson and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

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. — Read more

  cancel

http://www.eharning.us/wiki/luajson/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

docs: documents 1.1.1 release 
harningt (author)
Tue Jan 26 09:15:10 -0800 2010
commit  0e15d3ce3614ef9927656802763c8e62f7145bc0
tree    bb56ae8fef88834563474826e68179612bb26d16
parent  12e11f285b7ad5962af383592f85f25eca5b34cd
luajson /
name age
history
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 Tue Jan 26 09:15:10 -0800 2010 docs: documents 1.1.1 release [harningt]
directory docs/ Tue Jan 26 09:15:10 -0800 2010 docs: documents 1.1.1 release [harningt]
directory lua/ Mon Jan 25 11:26:59 -0800 2010 Merge branch '1.0.x' * 1.0.x: decoder/encode... [harningt]
directory rockspecs/ Thu Jan 07 16:56:21 -0800 2010 base: rockspec 1.1-1 final tagging [harningt]
directory tests/ Tue Jun 23 21:47:36 -0700 2009 tests: tests added for simple/default decoders ... [harningt]
directory util/ Thu Jan 07 16:15:22 -0800 2010 base: updates utility to help construct lua roc... [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.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server