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
}