docs(lib): narrate table/text/json as code-as-docs pilot

Add purpose lines and bracket-call examples in EN/ZH libs and public/stdlib
demos; keep explicit + params so function-body prose cannot be mistaken for
link-index or bold code.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-14 11:38:24 +08:00
1 parent 0e0655b316
commit 53bc3538da
13 files changed
+238 -89

No files matched your search

+8 -10
View File
@@ -1,19 +1,17 @@
---
title: lib/json — JSON
description: Shared EN/ZH path; parse and stringify
description: Shared EN/ZH path; parse and stringify (code-as-docs pilot)
import json:lib/json.mq.md
---
# main
Import lib/json.mq.md from both English and Chinese docs (no translated twin). Functions: parse(text), stringify(value), get(value, key), keys(value), quote(text) — JSON string literal with quotes (for building request bodies). Objects become the map runtime type.
Shared JSON helpers for EN and ZH docs. Prefer parse, stringify, and quote.
Build maps with tables or table.put — not json.set chains.
**`obj` = > json.parse text="{}"**
**`obj` = [json.parse] text="{}"**
**`ty` = > type `obj`**
**打印 内容=`ty`**
**`ty` = > type `obj` **
> print text=`ty`
**`out` = > json.stringify value=`obj` **
> print text=`out`
**`out` = > json.stringify value=`obj`**
**打印 内容=`out`**