Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
222e486
Major lljson rework
HaroldCindy Mar 11, 2026
a52935a
Better handling of sparse tables
HaroldCindy Mar 16, 2026
8b49a3d
Add explicit tests for replacer / reviver order
HaroldCindy Mar 18, 2026
e863750
Unify stringified number -> number logic in lljson
HaroldCindy Mar 18, 2026
38124a5
Allow using UUIDs as object keys in lljson.encode()
HaroldCindy Mar 18, 2026
c4f8a92
Tighten up validation for floating point coords in lljson
HaroldCindy Mar 19, 2026
44c7639
Update VM/src/cjson/lua_cjson.cpp
HaroldCindy Mar 19, 2026
86cffc1
Ensure __tojson is not run on replacer result
HaroldCindy Mar 19, 2026
3d2ae9e
Add support for tracking path in lljson.decode() through context
HaroldCindy Mar 20, 2026
31f7cae
Set `object` and `array` metatables as appropriate in `lljson.decode()`
HaroldCindy Mar 20, 2026
2e141b2
Exercise better hygiene when registering object_mt and array_mt for Ares
HaroldCindy Mar 20, 2026
b1bf8e6
Improve GC validation around fixed vars on graylist
HaroldCindy Mar 20, 2026
d87673b
Add tests clarifying who 'wins' for __jsontype detection
HaroldCindy Mar 20, 2026
fa4a80b
Correctly track allow_sparse across yields
HaroldCindy Mar 20, 2026
6c2d9a6
__jsontype -> __jsonhint, allow non-arrays with array hint
HaroldCindy Mar 21, 2026
0e4a513
Remove __len sniffing and __index use in array serialization
HaroldCindy Mar 21, 2026
eec5250
Add yield step for allow_sparse preservation
HaroldCindy Mar 21, 2026
9dfb4e0
Error on non-function `replacer` and `reviver`
HaroldCindy Mar 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion VM/include/lljson.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#define UTAG_JSON_CONFIG 27

#define JSON_NULL ((void *)3)
#define JSON_EMPTY_ARRAY ((void *)4)
#define JSON_ARRAY ((void *)5)
#define JSON_REMOVE ((void *)6)
#define JSON_OBJECT ((void *)7)

constexpr int LU_TAG_JSON_INTERNAL = 60;
5 changes: 5 additions & 0 deletions VM/src/ares.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3034,6 +3034,11 @@ static void scan_metatable(lua_State *L, bool forUnpersist, const std::string& p
// Register the metatable as a permanent
std::string mt_name = prefix + "/mt";

// empty_array/empty_object are special, they share array_mt/object_mt, which are
// registered under their canonical names. Skip the alias to avoid duplicates.
if (mt_name == "g/lljson/empty_array/mt" || mt_name == "g/lljson/empty_object/mt")
return;

if (forUnpersist) {
lua_pushstring(L, mt_name.c_str()); // ... perms obj_table mt name
lua_pushvalue(L, -2); // ... perms obj_table mt name mt
Expand Down
Loading
Loading