How to store JSON object in SQLite database

前端 未结 5 2036
夕颜
夕颜 2020-12-04 08:29

how do I store a JSON Object in an SQLite database? What is the correct way?

one place is the blob type column. if i can convert the JSON object into byte array an

5条回答
  •  情歌与酒
    2020-12-04 08:44

    https://github.com/app-z/Json-to-SQLite

    At first generate Plain Old Java Objects from JSON http://www.jsonschema2pojo.org/

    Main method

    void createDb(String dbName, String tableName, List dataList, Field[] fields){ ...

    Fields name will create dynamically

提交回复
热议问题