CyberM.json

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

client runtime2 functionsMarkdown

decode

SHARED

CyberM.json.decode(text)

Parses a JSON string.

Parses JSON into CyberM's bounded Lua value model. Invalid JSON returns nil, "invalid_json"; decoded objects and arrays contain only supported scalar/table values.

Parameters

  • textstringrequired

Returns

  • value, or nil
  • reason

Registered in ResourceHost.cpp as LuaJsonDecode (line 6830).

encode

SHARED

CyberM.json.encode(value)

Serialises a Lua value to JSON.

Serializes a supported Lua value to JSON using the same bounded representation used by events, exports and WebUI. Functions, userdata, cycles and unsupported table shapes return nil, reason.

Parameters

  • valueanyrequired

Returns

  • string, or nil
  • reason

Registered in ResourceHost.cpp as LuaJsonEncode (line 6829).

For agents and LLMs: this page as Markdown · llms.txt · llms-full.txt