Data & text · BUILT-IN MODULE

json

JSON parsing and serialization.

Quick start

use json
use json

data = json.parse "{\"name\":\"SE\"}"
say data["name"]
say json.pretty data

API reference

json.parse text

Parse JSON Text into an SE value.

將 JSON Text 解析成 SE 值。
json.stringify value

Serialize an SE value as compact JSON.

將 SE 值序列化為精簡 JSON。
json.pretty value

Serialize an SE value as formatted JSON.

將 SE 值序列化為格式化 JSON。