how to save data from json in sqlite in android -


i'm new in android programming , want find how store data json in sqlite android.i didn't find useful examples of in internet,that's why i'm asking here.if show me simple example of happy.thanks lot!

create model class has properties of json model.

create constructor in model accepts org.json.jsonobject (search android developers reference).

in constructor, read values of jsonobject properties example methods string optstring() , int optint().

you can use ormlite android save object sqlite. can find working examples here:

http://ormlite.com/docs/android-examples

you need import ormlite-core , ormlite-android .jar libraries in android project.

http://sourceforge.net/projects/ormlite/files/releases/com/j256/ormlite/

ormlite works fast , has convenient access methods. have used multiple times in projects.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -