Skip to content

Update json.lua - #40

Open
luistung wants to merge 1 commit into
rxi:masterfrom
luistung:master
Open

luistung wants to merge 1 commit into
rxi:masterfrom
luistung:master

Conversation

@luistung

Copy link
Copy Markdown

add a dummy key { _ = false } to force empty table to be encoded to as an object
fix for issue #23

add a dummy key { _ = false } to force empty table to be encoded to as an object
@appgurueu

Copy link
Copy Markdown

Very dirty.

megvadulthangya added a commit to megvadulthangya/json.lua that referenced this pull request Oct 27, 2026
- Add Lua 5.5 compatibility (use table.unpack, math.tointeger)
- Rewrite encoder/decoder to use a rope for O(n) performance (rxi#46)
- Encode numbers with %.17g for lossless 64-bit float round-trip (rxi#42)
- Handle nil values in arrays by emitting null (rxi#52)
- Sort object keys for deterministic output (rxi#51)
- Support numeric table keys (rxi#43)
- Encode empty tables as [] by default, with force_object option (rxi#40)
- Add SPARSELIMIT for sparse array handling (rxi#28)
- Make number parsing locale-independent (rxi#20)
- Bump version to 0.2.0
- Update PKGBUILD for Lua 5.5 and new version
- Update README with supported versions and new options
- Add tests for nil arrays, sorted keys, empty tables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants