开发者

HashMap in an SQLite Database

I would like to store a HashMap in an SQLite Database. I have tried using an object database, but it's more bulky than I would like for android developme开发者_如何学Pythonnt. Would I just serialize it and then store the result of serialization? Or must I do something else?


Seeing HashMap is a key/value pair, why not add all keys/values to a JSON Object and store the object in SQLite?


A Map is key/value pairs. If you have a table with a primary key column that matches your Map key you can add one row per Map entry into the database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜