peterohler

Joined 9 years ago

Karma
233
Submissions
97
Member since
Apr 23
C developer with projects with JSON, Ruby, Go, Graph databases, fast web server, and more. https://github.com/ohler55/oj https://github.com/ohler55/ox https://github.com/ohler55/ojc https://github.com/ohler55/ojg https://github.com/ohler55/agoo https://github.com/ohler55/agoo-c https://github.com/ohler55/graphql-test-tool
View on Hacker News

Recent submissions

Comment · 5 months ago
Comment · 5 months ago
I was contacted by the submitter and they apologized and removed the blog entry. It was AI generated. It was nice to see they were upstanding enough to correct it. That's a plus in my book.
Comment · 7 months ago
Another alternative is oj, https://github.com/ohler55/ojg. I don't know how the performance compares to jq or any others but it does use JSONPath as the query language. It has a few other options for making nicely formatted JSON and colorizing JSON.
Comment · 8 months ago
Comment · 10 months ago
Comment · 10 months ago
Thanks for the help.
Comment · 10 months ago
After several years of development here is a mostly Common LISP implementation written in Go with a REPL, CLOS, generics, Flavors, and much more.
Comment · 1 year ago
If you prefer JSONPath as a query language, oj from https://github.com/ohler55/ojg provides that functionality. It can also be installed with brew. (disclaimer, I'm the author of OjG)
Comment · 1 year ago
I'm clearly biased but oj which uses JSONPath is my preferred JSON manipulator. It can be installed with brew. It may not be for everyone but some of you might like it.
Comment · 1 year ago
My experience is quite a bit different. Of course the examples I would use are more like what you might expect in real code. The comparison should be against code that calls a function that either returns and error and checks that error or one that panics and recovers. The overhead of returning the extra error and then the conditional used to check that error is more than a panic on error and recovery somewhere up the stack. This was not true in the early days of go but it is true today.

It really depends on the code being written. Try one approach then the other and see if it works better in your situation. For the example in the article there is really no need for an error check in the idiomatic case so why compare that to using panic. If there was an error to check the result would be much different.

Comment · 1 year ago
Merged. Didn't seem to make much difference though. Results for the original Oj parser are pretty close to the core json now. I'll have to update the README for Oj. It's a bit stale. The new Oj::Parser is still much faster if not restricted to the current Rails environment.
Comment · 1 year ago
If you would like to discuss separately on a call or chats I'd be up for that. Maybe kick around a few ideas.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton