Syncing to a server is another issue and I am not sure if it should be part of the same library.
It's not so great for schemaless object databases or navigating nested arrays and hashmaps.
Some relational databases can store JSON objects, and incorporate SQL extensions to navigate those objects.
But in general, SQL doesn't seem to be a great tool for data that isn't a collection of two-dimensional data structures.
Syncing to a server is another issue and I am not sure if it should be part of the same library.