data: data/json and data/xml (thin wrappers over codecs/Json / codecs/Xml; JSON Lines option; API tests)

This commit is contained in:
4DBug committed 2026-10-31 08:40:26 -05:00
1 parent a1edea0e44
commit eeb62192b5
6 files changed
+291

No files matched your search

+24
View File
@@ -26,6 +26,30 @@ local list: { Entry } = {
return require("@formats/image/png")
end,
},
{
name = "json",
category = "data",
path = "data/json",
extensions = { "json", "jsonl", "ndjson", "geojson" },
mime = { "application/json", "application/x-ndjson" },
deps = { "core/Err", "core/Bytes", "codecs/Json" },
caps = { decode = true, encode = true, ordered = true, streaming = true },
load = function()
return require("@formats/data/json")
end,
},
{
name = "xml",
category = "data",
path = "data/xml",
extensions = { "xml", "xsd", "xsl", "xslt", "rss", "atom", "xhtml" },
mime = { "application/xml", "text/xml" },
deps = { "core/Err", "core/Bytes", "Types", "codecs/Xml" },
caps = { decode = true, encode = true, namespaces = true, streaming = true },
load = function()
return require("@formats/data/xml")
end,
},
}
return list