News for hackers. Stuff that matters.
Re:JSONlite – A self-contained, serverless, zero-configurati... by NelsonMinar on Tuesday September 22, 2015 @10:41AM (#10258862)
I've been wanting something like SQLite for JSON for awhile now. Or alternately, something like Mongo but without the server process.

The challenge is the query system, finding documents again. This JSONlite doesn't have one (yet) other than retrieving documents by UUID. There's been some work to make jq usable as a library, that seems like a good basis for JSON queries. https://github.com/stedolan/jq/wiki/C-API:-libjq

Re:JSONlite – A self-contained, serverless, zero-configurati... by chrismanning on Tuesday September 22, 2015 @12:02PM (#10259453)
EJDB [0] is pretty good and seems to be actively developed again after a period of inactivity. It uses BSON rather than JSON directly but close enough, and the queries are modelled after Mongo too.

I made a C++14 wrapper [1] a while ago which will probably still work unless EJDB itself had some drastic API changes. (I also have a C++14/1y BSON/JSON library [2] that's handy for working with EJDB, but is a bit of a playground for template metaprogramming so compile times will explode with certain functionality).

The main problem with EJDB is that it's not crash tolerant so you need signal handlers to attempt a graceful flush/close on a global handle.

[0] https://github.com/Softmotions/ejdb

[1] https://github.com/chrismanning/ejpp

[2] https://github.com/chrismanning/jbson

Re:JSONlite – A self-contained, serverless, zero-configurati... by coleifer on Tuesday September 22, 2015 @01:00PM (#10259917)
I took a look at EJDB recently and thought it looked like a pretty neat project. One potential gotcha is that it is built on TokyoCabinet which AFAIK is no longer maintained. Looks like they have plans to build a v2, though.
Re:JSONlite – A self-contained, serverless, zero-configurati... by coleifer on Tuesday September 22, 2015 @12:59PM (#10259903)
I commented above, but UnQLite is basically SQLite for JSON documents. If you're brave, SQLite has a new JSON extension as well, which looks pretty awesome.