I'm using the native MongoDB driver and API, which uses com.mongodb.DBObject
to represent JSON objects, however for general purpose I have usage of org.json.JSONOBject
.
I thought of replacing it and using DBObject as a general JSON library, but it doesn't feel right.
But to interop with the two, the low level String/Map format/parse interface is used, which I don't like either.
Is there a known library out there that implements both interfaces for easier interoperability?
In general, converting between BSON and JSON was intended to be a painless operation, so you shouldn't have to write more classes. Does this answer help at all?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With