all repos

json2go @ main

convert json to go type annotations
a1fb55e — Oleksandr Smirnov Sun, 12 Jul 2026 2026-07-12 13:02:52 +0300
fix!: indentation
07ff9b9 — Oleksandr Smirnov Sat, 11 Jul 2026 2026-07-11 14:04:12 +0300
remove dead code
e64121e — Oleksandr Smirnov Sat, 11 Jul 2026 2026-07-11 13:56:41 +0300
refactor!: inline all nested types

Clone urls

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

Mirror status

Up to date (checked 8 minutes ago), source: https://github.com/olexsmir/json2go

json2go
-------

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

library Usage:

    // with json tags
    code, err := json2go.Transform("User", `{"name": "Alice"}`, true)

    // without json tags
    code, err := json2go.Transform("User", `{"name": "Alice"}`, false)


cli interface:

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

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