forked from zeng-github01/OC-Doc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserialization.lua
More file actions
21 lines (17 loc) · 750 Bytes
/
serialization.lua
File metadata and controls
21 lines (17 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---@meta
--- OpenComputers Serialization API
---
--- Provides functions to serialize and unserialize Lua values.
---@class SerializationLib
local serialization = {}
--- Serializes a value to a string of Lua code.
--- Supports basic types and tables without cycles. Use pretty for human-readable output.
---@param value any Value to serialize (functions not supported)
---@param pretty boolean|number? Pretty print mode or entry count (optional)
---@return string Serialized string
function serialization.serialize(value, pretty) end
--- Unserializes a string produced by serialization.serialize.
---@param value string String to unserialize
---@return any The deserialized value
function serialization.unserialize(value) end
return serialization