chroma_solstice/libs/json4lua
Your Name 03532d29e4 Vendor libs/hump, sfxrlua, json4lua, narrator as real files
These were committed as empty submodule gitlinks with no .gitmodules,
so the folders were never populated and the game could not load
(require of libs/hump/timer, libs/sfxrlua/sfxr, narrator.narrator).
Checked out each at its pinned commit and vendored the files, matching
the existing bundled-libs convention. Removed the junk libs/libs/ tree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-11 11:37:09 -04:00
..
doc Vendor libs/hump, sfxrlua, json4lua, narrator as real files 2026-08-11 11:37:09 -04:00
examples Vendor libs/hump, sfxrlua, json4lua, narrator as real files 2026-08-11 11:37:09 -04:00
json Vendor libs/hump, sfxrlua, json4lua, narrator as real files 2026-08-11 11:37:09 -04:00
json4lua-1.0.0-1.rockspec Vendor libs/hump, sfxrlua, json4lua, narrator as real files 2026-08-11 11:37:09 -04:00
README.md Vendor libs/hump, sfxrlua, json4lua, narrator as real files 2026-08-11 11:37:09 -04:00

json4lua

JSON and JSONRPC for Lua

Installation

luarocks install --server=http://rocks.moonscript.org/manifests/amrhassan --local json4Lua

JSON Usage

Encoding

json = require('json')
print(json.encode({ 1, 2, 'fred', {first='mars',second='venus',third='earth'} }))
[1,2,"fred", {"first":"mars","second":"venus","third":"earth"}]

Decoding

json = require("json")
testString = [[ { "one":1 , "two":2, "primes":[2,3,5,7] } ]]
decoded = json.decode(testString)
table.foreach(decoded, print)
print ("Primes are:")
table.foreach(decoded.primes,print)
one		1
two		2
primes		table: 0032B928
Primes are:
1		2
2		3
3		5
4		7

JSONRPC Usage

json = require('json')
require("json.rpc")
server = json.rpc.proxy("http://jsolait.net/testj.py")
result, error = server.echo('Test echo!')
print(result)
Test echo!