jsonToGo

try to take over the world!

作者
378978764
日安装量
0
总安装量
3
评分
0 0 0
版本
0.1
创建于
2020-05-05
更新于
2020-05-05
大小
10.5 KB
许可证
暂无
适用于
所有网站

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
}