News for hackers. Stuff that matters.
Re:Show HN: Jason – A new JSON Library for Go by antonholmquist on Tuesday December 02, 2014 @11:37AM (#8687941)
Thanks for your feedback. I created the library simply because it just fits my use cases better. I have used encoding/json quite a lot, and for instance, I think golang's strict types makes it inconvenient to dig through arbitrary maps in a quick way.

That's what the Get-method in Jason is trying to solve. Similar to how bitly/go-simplejson does it, but with some fine tuning.

Re:Show HN: Jason – A new JSON Library for Go by ryanlschneider on Tuesday December 02, 2014 @12:19PM (#8688267)
Speaking of the .Get method, wouldn't returning an error alongside the value instead of just the default object be more idiomatic?
Re:Show HN: Jason – A new JSON Library for Go by courtf on Tuesday December 02, 2014 @02:37PM (#8689306)
I think it would be nice to return a bool, rather than an error. It really is just a binary condition and this pattern fits nicely with accessing values in maps. That said, I haven't really found a need for a .Get method in my own code, and will probably just stick with encoding/json for the time being.
Re:Show HN: Jason – A new JSON Library for Go by libria on Tuesday December 02, 2014 @12:29PM (#8688352)
It looks like .Get uses the null pattern (ie, returns a Jason struct with data = `nil` if nothing is found). Your way is more idiomatic, but it looks like his point with this library is to access the data conveniently in exchange for type-safety. `exists()` can verify something was found if needed.