3 ms·
For me the biggest PITA lately with Go is dealing with json. Exhaustively listing every potential field in order to type it is maddening.
by 1_2__4 9y ago
For me the biggest PITA lately with Go is dealing with json. Exhaustively listing every potential field in order to type it is maddening.
- chimeracoder 9y ago> For me the biggest PITA lately with Go is dealing with json. Exhaustively listing every potential field in order to type it is maddening. Sounds like gojson[0] would make your life a lot easier - it automatically generates the struct definitions for you. [0] https://github.com/ChimeraCoder/gojson https://github.com/ChimeraCoder/gojson
- yandrypozo 9y agohttps://mholt.github.io/json-to-go/ https://mholt.github.io/json-to-go/
- shaftoe 9y agoI actually like this feature. If I truly don't need a field, I leave it out. If I do need it, I have a clear definition of what it is. This feels so much easier to work with than untyped scripting languages where I basically get a hash bag and read values out ad-hoc, checking what they are as I go.
- deleted 9y ago[deleted]