gojson icon indicating copy to clipboard operation
gojson copied to clipboard

Generate struct with pointers

Open katcipis opened this issue 10 years ago • 0 comments

I'm using gojson here and I need to check for some obligatory fields on my JSON. AFAIK the only way to do that using only Go (no other third party tool that validates the JSON based on a schema) is to use pointers on the struct, so I can check it for nil after the parsing.

Is there a way to generate the struct with pointers right now ? If it does not have support to this, does it even make sense ? :-)

katcipis avatar Aug 13 '15 14:08 katcipis