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:
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
Post a Comment