json-to-go
json-to-go copied to clipboard
将json生成go的数据结构。Online tool that convert JSON to Go.
- 同结构,属性类型不同 ```json { "aaa": { "bbb": { "a": 123 } }, "bbb": { "a": true } } ``` - 同结构,属性不同 ```json { "aaa": { "bbb": { "a": 123 }...
```json { "a": -1231.323, "b": { "z": 31, "p": true, "123": "key是字符串" } } ``` 下面哪种转换比较合理呢...... ```go type RootObject struct { A float64 `json:"a"` B map[string]interface{} `json:"b"` } ``` ```go...
**Original Data** ```json5 [[1],[true],[[2.3]]] ``` **Result** ```go type RootObject []interface{} ``` **Expect** ```go type RootObject [][]interface{} ```
**Original Data** ```json5 { "a": 123, "b": "xxx", "c": [ [ 1, 2, 3 ], [ 1, null, 3 ] ] } ``` **Result** ```go type RootObject struct { A...