Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MeetLima/json.lua

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
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

 
 
 

Contributors

Languages

  • Lua 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.