GitShow/mholt/json-to-go
mholt

json-to-go

Translates JSON into a Go type in your browser instantly (original)

by mholt
gogolangjsontranslates-json
Star on GitHubForkWebsitenpm

JavaScript

4.6k stars482 forks23 contributorsQuiet · 1y agoSince 2014MIT

Meet the team

See all 23 on GitHub →
mholt
mholt32 contributions
grische
grische20 contributions
mike-hosseini
mike-hosseini5 contributions
kkkiio
kkkiio2 contributions
netaisllc
netaisllc2 contributions
ShevaXu
ShevaXu2 contributions
anpez
anpez1 contribution
remitly-brandonr
remitly-brandonr1 contribution

Recent PRs & issues

Quiet · 4 in progress · Last activity 1y ago
See all on GitHub →
ClifHouck
Add support for `omitzero` struct field optionOpenIssue

Go 1.24's json/encoding has added support for a new struct field option: . From Go 1.24's release notes: When marshaling, a struct field with the new omitzero option in the struct field tag will be omitted if its value is zero. If the field type has an IsZero() bool method, that will be used to determine whether the value is zero. Otherwise, the value is zero if it is the zero value for its type. The omitzero field tag is clearer and less error-prone than omitempty when the intent is to omit zero values. In particular, unlike omitempty, omitzero omits zero-valued time.Time values, which is a common source of friction. This is a really nice addition, especially for JSON requests. Could json-to-go support this alongside the option? BTW your tool has been really useful to me. Thanks for putting out there!

ClifHouck · 1y ago
zweix123
Convert with annotationsOpenIssue

This is a great tool. I have an idea that although annotations are not included in the Json standard, they have been widely implemented; Can our tool also place the corresponding comments after the converted fields while parsing Json?

zweix123 · 1y ago
alob-mtc
Create a VSCode extension version of this OpenIssue

Feature suggestion.** if we can have a VSCode extension version of this. Goland IDE has this by default VSCode doesn't. It would be really nice to have.

alob-mtc · 1y ago

Recent fixes

View closed PRs →
mcarbonneaux
Golang Version of JsonToGo...ClosedIssue

For information i've converted the javascript code to golang (AI assisted !) because we need to use in golang directly to generate golang struct. https://github.com/MCAProject/go-json-to-go

mcarbonneaux · 1y ago
YaroslavPodorvanov
Store dark modeMergedPR

As user i want to continue with same "dark-mode" as set before

YaroslavPodorvanov · 1y ago
grische
upgrade ints and floats in arrays with mixed sizesMergedPR

This improves the conversion but does not fix #67 unfortunately. ~~Depends on #133~~

grische · 1y ago
Structured data for AI agents

Repository: mholt/json-to-go. Description: Translates JSON into a Go type in your browser instantly (original) Stars: 4628, Forks: 482. Primary language: JavaScript. License: MIT. Homepage: https://mholt.github.io/json-to-go/ Topics: go, golang, json, translates-json. Open PRs: 4, open issues: 15. Last activity: 1y ago. Top contributors: mholt, grische, mike-hosseini, kkkiio, netaisllc, ShevaXu, anpez, remitly-brandonr, ejcx, hajimehoshi and others.

·@ofershap

Replace github.com with gitshow.dev