编辑器

容量: 41 B / 20.00 MB

转换与查询

可视化

树状图

root(object, 2)
  • hello:"world"
  • list(array, 3)
    • 0:1
    • 1:2
    • 2:3

表格视图

表格视图仅支持对象数组,如 [{"a":1},{"a":2}]

历史记录

  • 暂无历史记录

API 测试

API 测试工具

状态

代码片段

JavaScript

// JavaScript (Node.js)
const obj = JSON.parse(`{
  "hello": "world",
  "list": [
    1,
    2,
    3
  ]
}`);
console.log(obj);

Python

# Python
import json
obj = json.loads('''{
  "hello": "world",
  "list": [
    1,
    2,
    3
  ]
}
''')
print(obj)

Go

// Go
package main
import (
  "encoding/json"
  "fmt"
)
func main() {
  var obj map[string]interface{}
  data := []byte(`{
  "hello": "world",
  "list": [
    1,
    2,
    3
  ]
}`)
  if err := json.Unmarshal(data, &obj); err != nil { panic(err) }
  fmt.Println(obj)
}