Skip to content
forked from MeetLima/json.lua

Lima's version of the JSON wheel.

License

Notifications You must be signed in to change notification settings

oploadk/json.lua

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json.lua

Presentation

This is Lima's version of the JSON wheel. It is a fork of rxi/json.lua.

Typically we only use the encoder with Lua 5.3. Consider other use cases unsupported (see Alternatives).

Dependencies

None except Lua 5.3.

Usage

> json = require "json"
> json.encode({foo = { bar = "baz", answer = 42 }})
{
  "foo":{
    "bar":"baz",
    "answer":42
  }
}
> json.encode({foo = { bar = "baz", answer = 42 }}, false) -- no pretty printing
{"foo":{"bar":"baz","answer":42}}

Alternatives

For a full-featured, pure Lua + LPeg JSON encoder / decoder, check out luajson.

Otherwise, there are plenty of options in LuaRocks.

License

This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE.txt for details.

About

Lima's version of the JSON wheel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 100.0%