jsonToGo

try to take over the world!

Author
378978764
Daily installs
0
Total installs
3
Ratings
0 0 0
Version
0.1
Created
2020-05-05
Updated
2020-05-05
Size
10.5 KB
License
N/A
Applies to
All sites

json2type

Convert json to golang, typescript, python3 type declaration.

Usage

1、Install tampermonkey. 2、Open browser console. 3、In the console, following commands are supported:

json text to golang type declaration

input:

document.jsonToGo('{"name":"user","age":18}')

output:

type AutoGenerated struct {
    Name string `json:"name"`
    Age int `json:"age"`
}

json text to typescript type declaration

input:

document.jsonToTs('{"name":"user","age":18}')

output:

{
  name: string,
  age: number
}