3 Commits

Author SHA1 Message Date
Albert Krewinkel 83de55bb35 Lua: Set pandoc.List as default metatable for JSON lists
Lists created by `pandoc.json.decode` now behave like lists generated
via `pandoc.List`. This also ensures that `pandoc.List` tables are
encoded as JSON arrays when passed to `pandoc.json.encode`.

Fixes: #9834
2024-06-01 21:10:29 +02:00
Albert Krewinkel 0e4b397e70 Lua: fix json.encode for nested AST elements.
Ensures that objects with nested AST elements can be encoded as JSON.
2023-03-20 16:06:19 +01:00
Albert Krewinkel 75b5851d21 Lua: add module pandoc.json to handle JSON encoding
Closes: #8605
2023-02-11 14:53:53 -08:00