release: v2.2.2 V_safe JSON integer refuse on foreign bridge
Align host json encode/decode with Lean ForeignJSON: refuse OOD integers instead of silent Node distortion; keep decimal-string BigInt author path. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
58791fc7d9
commit
82c8d78fd3
21 files changed
+449
-17
No files matched your search
@@ -0,0 +1,23 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: foreign Python JSON number V_safe refuse
|
||||
import:
|
||||
foreign: lib/foreign.mq.md
|
||||
json: lib/json.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
**py = > foreign.session_open lang="python" timeout=30**
|
||||
|
||||
`emit` =
|
||||
```python
|
||||
import json
|
||||
print(json.dumps({"n": 2**60 + 1}))
|
||||
```
|
||||
|
||||
**raw = > foreign.session_eval id=`py` code=`emit`**
|
||||
**stdout = > json.get value=`raw` key="stdout"**
|
||||
**payload = > json.parse text=`stdout`**
|
||||
**> print text=`payload`**
|
||||
**> foreign.session_close id=`py`**
|
||||
Reference in new issue
Block a user