[mirror] convert json to go types olexsmir.xyz/json2go
Go 100.0%
12 1 4

Clone this repository

https://tangled.org/olexsmir.xyz/json2go
git@tangled.org:olexsmir.xyz/json2go

For self-hosted knots, clone URLs may differ based on your setup.

readme.txt
json2go
-------

json2go to go provides a library and cli tool for
converting json strings to go struct definitions

    t := json2go. NewTransformer()
    typedef, err := t.Transform(`{"json": true}`, "TypeName")


cli interface:

    go install olexsmir.xyz/json2go/cmd/json2go@latest

    echo '{"id": 1, "name": "Alice"}' | json2go
    json2go '{"id": 1, "name": "Alice"}'