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>
494 B
494 B
markup, title, import
| markup | title | import | ||||
|---|---|---|---|---|---|---|
| occlusion | foreign V_safe refuse after Python arithmetic |
|
main
py = > foreign.session_open lang="python" timeout=30
emit =
import json
n = 2**53 - 1
print(json.dumps({"n": 2 * n}))
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