Hacker GitHub

← All repos

ohler55/ojg

View on GitHub ↗ ★ 956 Go

Optimized JSON for Go

24 mentions on Hacker News by 6 people: 6 stories, 18 comments · first 2020-06-27 · latest 2026-03-27

Mentions per year 24 mentions · busiest year 2021 (6)
20082026
  1. 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…
    comment by peterohler · 2026-03-27 · in A Faster Alternative to Jq
  2. 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 by peterohler · 2025-10-27 · in Show HN: JSON Query
  3. There are a few more tolerant versions of JSON. In OjG I called the format SEN https://github.com/ohler55/ojg/blob/develop/sen.md
    comment by peterohler · 2024-12-09 · in JSON5 – JSON for Humans
  4. I found Jq to be difficult to use which is why Oj, https://github.com/ohler55/ojg is based on JSONPath. There still are a lot of options but it only takes a couple of help screens to figure out what the options are.
    comment by peterohler · 2023-11-08 · in Interactive examples for learning jq
  5. You might want to take a look at https://github.com/ohler55/ojg . It takes a different approach with a single pass parser. There are some performance benchmarks included on the README.md landing page.
    comment by peterohler · 2023-11-05 · in Building a high performance JSON parser
  6. I like the "Simple Encoding Notation" (SEN) of the underlying library: https://github.com/ohler55/ojg/blob/develop/sen.md " A valid example of a SEN document is: { one: 1 two: 2 array: [a b c] yes: true } "
  7. …solution though. There needs to be an efficient and easy way to extract the data of interest. OjG ( https://github.com/ohler55/ojg ) has a JSONPath implementation for that. Written in go is a high performer.
  8. For me OjG ( https://github.com/ohler55/ojg ) has been great. I regularly use it on files that can not be loaded into memory. The best JSON file format for multiple record is one JSON document per record all in the same file. OjG doesn't…
  9. Another alternative is the oj app (ojg/cmd/oj) which is part of https://github.com/ohler55/ojg . It relies on JSONPath for extraction and manipulation of JSON.
  10. Just tried [OjG]( https://github.com/ohler55/ojg ) and saw anywhere from zero to 20% faster on the various benchmarks. Nice improvement overall. Hats off to the golang maintainers.
    comment by peterohler · 2021-08-17 · in Go 1.17 Release Notes
  11. …avoid the unusual convention. Maybe a `-edge` and `-max-depth` options in addition. Issue created: https://github.com/ohler55/ojg/issues/36
    comment by peterohler · 2021-02-23 · in The Pretty JSON Revolution
  12. An issue has been added to the repo. It is on the list now. Great idea, thanks. https://github.com/ohler55/ojg/issues/35
    comment by peterohler · 2021-02-23 · in The Pretty JSON Revolution
  13. Have you compare it to OjG ( https://github.com/ohler55/ojg )? You could also add your parser to https://github.com/ohler55/compare-go-json .
    comment by peterohler · 2021-02-09 · in Show HN: A fast JSON library for Go
  14. …pointed out there are often tradeoffs with DRY. One that I ran into not too long ago when writing https://github.com/ohler55/ojg was the performance penalty that DRY code can incur. Sadly there is a lot of repetition in that code but by…
    comment by peterohler · 2021-01-27 · in The Pros and Cons of DRY Code
  15. …to squeeze out a bit more performance is welcome. I might have to play with using panics in OjG ( https://github.com/ohler55/ojg ) and see if it gives a boost.
    comment by peterohler · 2021-01-20 · in Errors vs. exceptions in Go and C++ in 2020
  16. Check out jql [ https://github.com/cube2222/jql ] and oj [ https://github.com/ohler55/ojg ]
  17. The oj command in https://github.com/ohler55/ojg uses JSONPath as the query and filter language. Maybe it is more in line with what you are looking for.
  18. Interesting approach. A different approach was taken with OjG ( https://github.com/ohler55/ojg ) which shows a significant performance improvement over the current golang JSON parser.
    comment by peterohler · 2020-06-27 · in Building a high performance JSON parser