all repos

json2go @ main

convert json to go type annotations
dc8e547 — Oleksandr Smirnov Fri, 21 Aug 2026 2026-08-21 12:32:01 +0300
bump go to 1.26.7
f4bdc97 — Oleksandr Smirnov Fri, 21 Aug 2026 2026-08-21 12:32:01 +0300
drop stringer from go.mod
a1fb55e — Oleksandr Smirnov Sun, 12 Jul 2026 2026-07-12 13:02:52 +0300
fix!: indentation

Clone urls

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

Mirror status

Up to date (checked 2 hours 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