Thursday, September 15, 2011

[android-developers] SQLite and JSON or Java object serialization


Hello,

I have some Java objects which need to be written to a database while the
user interacts with the application. Such an object has nested objects and I
was considering implementing a proper SQLite representation of the object.
However in another application I just convert to JSON and write the whole
object to the database as a single record. Is there an analogous serialization
mechanism in android so that I may serialize the object and store a single
sqlite record in the database (the serialized objects)?

Any problems with this approach? What classes do I need to use?

Thanks,

John Goche

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment