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.
精彩评论