all repos

json2go @ v0.2.0

convert json to go type annotations
name last commit last update
.github/ ci: fix goreleaser 11 days ago 2026-05-26 14:27:58 EEST
cmd/ refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
testdata/ refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
.goreleaser.yaml chore: setup goreleaser 6 months ago 2025-11-27 15:00:41 EET
LICENSE chore: add license 6 months ago 2025-11-27 19:46:46 EET
go.mod refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
go.sum refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
json2go.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
json2go_bench_test.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
json2go_test.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
lexer.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
lexer_test.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
parser.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
parser_test.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
readme.txt refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
token.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
token_type_string.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
transpiler.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
transpiler_test.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
value.go refactor: use an actual parser instead of reflection 11 days ago 2026-05-26 14:07:11 EEST
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