Aditya Mukerjee

Results 61 comments of Aditya Mukerjee

Aha - I know where this error is: https://github.com/ChimeraCoder/gojson/blob/master/json-to-struct.go#L116 Basically, gojson tries to unmarshal it and then reflect on what the possible type is. At the top-level, JSON can either...

Alright, so I've updated `gojson` so that, as of c587013936aa14c410180b76ab0736bb8b01424b, top-level arrays will simply generate a type aliased to `[]interface{}`. This isn't as ideal as having it recurse down into...

Could you elaborate on the use case for preserving the order? Field names aren't quite like imports, but in Go, it's generally preferred to keep things in alphabetical order.

As of 9d7c991, the -struct flag has been added (and works properly) if -file is also specified explicitly. That is, ``` gojson -struct Foo -file json_example.json ``` and ``` gojson...

I'm not sure I understand. Could you give an example of the input/output pair you have in mind?

Which version of Go are you running? `gopkg.in/yaml.v2` is in the `vendor/` directory, so newer versions of Go should be able to pick it up there.

@ttacon Thanks for the feedback! I took a stab at this shortly after I posted this issue, but it's still incomplete (and I haven't looked at it recently). If you're...

Thanks for catching this! @jmervine - do you happen to remember what you meant here?

These are awesome! I like them both, but I think I prefer the first one. > I could also try a perspective shift where it's less "popping out of a...

Yeah, this is a good idea. I actually can't think of a reason not to include this in all files (many other code generation tools in Go already do), so...