micropython ujson
时间:2021-05-24 04:46:00
收藏:0
阅读:0
JSON
1. 对象 -> 字符串
import ujson
jsonObj = {"a": "1", "b": "2"}
jsonStr = ujson.dumps(jsonObj)
2. 字符串 -> 对象
import json
jsonStr = ‘{"a": "1", "b": "2"}‘
jsonObj = ujson.loads(jsonStr)
评论(0)