gojson
gojson copied to clipboard
Automatically generate Go (golang) struct definitions from example JSON
I want to use this structure variable when the program is running, but the result is stored in the file. I can't predict it in advance, which will lead to...
This PR adds support to generate structs with time.Time instead of string when the format matches ISO 8601 / RFC 3339.
Hi, this is a request to extend the struct generation to support time fields. If the string matches the ISO 8601 / RFC 3339 patterns, like: - 2021-07-28T12:34:56Z - 2021-07-28T16:34:56-04:00...
This depends on my previous PR and is branched of it: https://github.com/ChimeraCoder/gojson/pull/78 I'm writing an integration to a thirdpary application. I'm using this library to generate structs using example inputs...
Removed dep as dependency manager and changed to go modules. Removed vendor folder as well.
It does not work. Input: ```bash echo '{"value": 9.00}' | gojson -forcefloats ``` and the output is: ``` type Foo struct { Value int64 `json:"value"` } ``` The `-forcefloats` flag...
I'm trying to use gojson to generate structs for an array of items, which may or may not contain (disjunct) keys with different sub-objects. Example (let's call this `test.json`): ```json...
Re-opening pr #71 with a new branch. quoted description from original PR: As a proposal to #14, I think this will generate better struct names while avoiding the issue of...
When the JSON is of format [interface,interface,interface] gojson has trouble printing out the substructs.