This commit is contained in:
2025-11-28 21:12:57 -05:00
parent 705911ac9d
commit 8f16e257bb
17 changed files with 269 additions and 264 deletions

5
examples/json/Fes.toml Normal file
View File

@@ -0,0 +1,5 @@
[app]
name = "json"
version = "0.0.1"
authors = ["vx-clutch"]

View File

@@ -0,0 +1,34 @@
local fes = require("fes")
local site = fes.fes()
site.title = "JSON"
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
local json_pre = [[
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
}
]]
local json = fes.middleware.json_decode(json_pre)
site:h1("JSON")
site:note(fes.util.cc({
fes.std.h2("Before"),
fes.std.code(json_pre),
}))
site:note(fes.util.cc({
fes.std.h2("After"),
fes.std.ul({
json["userId"],
json["id"],
json["title"],
json["completed"],
})
}))
return site