Bind imports to library names with bare path calls (and use), forward optional host args through mq wrappers, stabilize writeback replacement newlines, and document the M1/M2 decisions. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
311 B
Markdown
24 lines
311 B
Markdown
---
|
|
title: json roundtrip
|
|
> lib/fs.mq.md
|
|
> lib/json.mq.md
|
|
---
|
|
|
|
# main
|
|
|
|
*`raw` = > fs.read_text path=sample.json *
|
|
|
|
*`obj` = > json.parse text=`raw` *
|
|
|
|
*`ty` = > type `obj` *
|
|
|
|
> print text=`ty`
|
|
|
|
*`a` = > json.get value=`obj` key=a *
|
|
|
|
> print text=`a`
|
|
|
|
*`out` = > json.stringify value=`obj` *
|
|
|
|
> print text=`out`
|