JSON-friendly database?
I have a pure jQuery app that keeps it's objects 开发者_JS百科in JSON format and provides client-side editing. I want to persist the JSON to a database, but everything seems like overkill (like object mapping in C#). I am close to settling on storing the whole JSON string into a single column of a database. I was hoping there was more of an elegant, creative approach like a jQuery/JSON/database framework out there, but couldn't find anything (maybe NoSql can be of use?).
Any suggestions or advise on how to persisting JSON to a database using as less server code as possible?
I would check out MongoDB due to it's JSON style documents.
It also has plenty of drivers, so I wouldn't see it being an issue.
I assume it's ok to use a server side technology, your description wasn't real clear for me.
The first thing that comes to mind for your needs is MongoDB (http://www.mongodb.org/). It sports a javascript shell and objects that are natively represented in JSON (BSON technically).
The server supports indexing and other things that give you the warm SQL fuzzies.
What about CouchDB? It uses JSON notation to store the objects and you could access the db directly from the client side via its REST interface.
Besides, there are already several jquery plugins for CouchDB, jqCouch just to mention one.
精彩评论