feat(rfc-cm): add JSON floats and compact formatting
- Replace the JSON number scanner with sign/integer/fraction/exponent
scanning; return Int or Float via 整数/小数 and reject missing digits.
- Add 片段/格式化文本/格式化列表/格式化对象/格式化 recursive formatter.
- Extend fixture 62 with floats ({1,2.5,-3e2,4E-1,{a:1.0},x}) and a compact
round-trip string.
- Update P2 status: only the separate stdlib package and frozen-CLI closure
lane remain.
Gate: fmt, clippy -D warnings, 407 tests passed.
This commit is contained in:
1 parent
5d3a5fb13b
commit
1a978c7a42
7 files changed
+280
-30
No files matched your search
@@ -135,6 +135,57 @@
|
||||
}
|
||||
},
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"entries": {
|
||||
"next": {
|
||||
"decimal": "37",
|
||||
"type": "int"
|
||||
},
|
||||
"ok": {
|
||||
"type": "bool",
|
||||
"value": true
|
||||
},
|
||||
"value": {
|
||||
"items": [
|
||||
{
|
||||
"decimal": "1",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"value": 2.5
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"value": -300.0
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"value": 0.4
|
||||
},
|
||||
{
|
||||
"entries": {
|
||||
"a": {
|
||||
"type": "float",
|
||||
"value": 1.0
|
||||
}
|
||||
},
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"value": "x"
|
||||
}
|
||||
],
|
||||
"type": "list"
|
||||
}
|
||||
},
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"value": "[1, 2.5, -300.0, 0.4, {\"a\": 1.0}, \"x\"]"
|
||||
}
|
||||
],
|
||||
"type": "list"
|
||||
|
||||
Reference in new issue
Block a user