Files
marqdo/tests/lib/json-roundtrip.mq.md

26 lines
346 B
Markdown

---
markup: occlusion
title: json roundtrip
import:
fs: lib/fs.mq.md
json: 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`