Вопрос

Hi I am newbie in android . I am retrieving data using json parsin and i want to insert the data in my database.So suggest me whether i should in xml/json form or directly in sqlite. I am good at sqlite but i am dont know to insert in json format please suggest me to insert in to Json Object.

Это было полезно?

Решение

The most useful solution is such a case will be to use libraries like GSON or Jackson for converting JSON response to POJO (btw, you can use nice site http://www.jsonschema2pojo.org/, which will help you to create the needed POJO automatically from your response). After that you can use ORM helpers to link these objects with SQLite database, like greenDAO or ORMLite. All these libs are well-documented, so you will dive inside them easily.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top