mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 21:10:36 +00:00
22 lines
368 B
Lua
22 lines
368 B
Lua
|
local serde = require("@lune/serde")
|
||
|
|
||
|
-- Generate testing data
|
||
|
|
||
|
local binaryBlob = ""
|
||
|
for _ = 1, 1024 do
|
||
|
binaryBlob ..= string.char(math.random(1, 127))
|
||
|
end
|
||
|
|
||
|
local jsonBlob = serde.encode("json", {
|
||
|
Foo = "Bar",
|
||
|
Hello = "World",
|
||
|
Inner = { Array = { 1, 2, 3 } },
|
||
|
}, true)
|
||
|
|
||
|
-- Return testing data and utils
|
||
|
|
||
|
return {
|
||
|
binaryBlob = binaryBlob,
|
||
|
jsonBlob = jsonBlob,
|
||
|
}
|