migrate: own JSON/CSV and Table serialization; drop the value algorithms
Move JSON, CSV and the Table serialization half of the frozen module to their unique source authority. Value operations now live only in std-collections; there is no second implementation or legacy forwarder. Baseline JSON/CSV and Table GFM expectations are carried into component cases. Refs cflmy/marqdo#9, cflmy/marqdo-std-data#1
This commit was merged in pull request #2.
This commit is contained in:
1 parent
e3c9488dca
commit
848af7a357
13 files changed
+1948
-6
No files matched your search
@@ -0,0 +1,42 @@
|
||||
---
|
||||
import:
|
||||
json: "std:data/json"
|
||||
---
|
||||
|
||||
# @exec json
|
||||
|
||||
## main
|
||||
|
||||
**`对象 = json.解析("{\"a\": 1, \"b\": [true, null, \"说\\\"好\"]}")`**
|
||||
|
||||
**`浮点 = json.解析("[1, 2.5, -3e2, 4E-1, {\"a\": 1.0}, \"x\"]")`**
|
||||
|
||||
**`失败 = json.解析("[1 2]")`**
|
||||
|
||||
**`尾随 = json.解析("1 2")`**
|
||||
|
||||
**深度文本 = ""**
|
||||
|
||||
**深度下标 = 0**
|
||||
|
||||
`while 深度下标 < 130`
|
||||
|
||||
**深度文本 = 深度文本 + "["**
|
||||
|
||||
**深度下标 = 深度下标 + 1**
|
||||
|
||||
`end`
|
||||
**深度下标 = 0**
|
||||
|
||||
`while 深度下标 < 130`
|
||||
|
||||
**深度文本 = 深度文本 + "]"**
|
||||
|
||||
**深度下标 = 深度下标 + 1**
|
||||
|
||||
`end`
|
||||
**深度 = json.解析(深度文本)**
|
||||
|
||||
**`多个 = json.解析多个("1 2 [3]")`**
|
||||
|
||||
`return [对象.ok, 对象.value.a, 对象.value.b[2], json.格式化(浮点.value), 失败.ok, 失败.code, 尾随.code, 深度.ok, 深度.code, 多个.ok, 多个.value]`
|
||||
Reference in new issue
Block a user