Reputation: 29463
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 development. Would I just serialize it and then store the result of serialization? Or must I do something else?
Upvotes: 3
Views: 4472
Reputation: 89169
Seeing HashMap is a key/value pair, why not add all keys/values to a JSON Object and store the object in SQLite?
Upvotes: 4
Reputation: 308763
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.
Upvotes: 1