1 files changed,
4 insertions(+),
4 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2025-11-27 15:09:19 +0200
Authored at:
2025-11-27 15:09:10 +0200
Change ID:
qxvlopluxmuouktttvlrytyrkzsyswxl
Parent:
bb3a1d4
M
readme.txt
ยทยทยท 2 2 ------- 3 3 4 4 json2go to go provides a library and cli tool for 5 -convening json strings to go struct definitions 5 +converting json strings to go struct definitions 6 6 7 7 t := json2go. NewTransformer() 8 - typedef, _ := t.Transform(jsonStr, "TypeName") 8 + typedef, err := t.Transform(`{"json": true}`, "TypeName") 9 9 10 10 11 11 cli interface: 12 12 13 13 go install olexsmir.xyz/json2go/cmd/json2go@latest 14 14 15 - echo "{...}" | json2go 16 - json2go "{...}" 15 + echo '{"id": 1, "name": "Alice"}' | json2go 16 + json2go '{"id": 1, "name": "Alice"}'