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
c2472d6
— Oleksandr Smirnov
Tue, 26 May 2026
2026-05-26 14:27:58 +0300
ci: fix goreleaser
fc9c7df
— Oleksandr Smirnov
Tue, 26 May 2026
2026-05-26 14:07:11 +0300
refactor: use an actual parser instead of reflection...
34a739e
— Oleksandr Smirnov
Sun, 07 Dec 2025
2025-12-07 16:48:44 +0200
feat: write errors to stderr
Clone urls
https://git.olexsmir.xyz/json2go
git@git.olexsmir.xyz:json2go
Mirror status
Up to date (checked 4 hours ago), source: https://github.com/olexsmir/json2go