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

2011-09-16 Thread ko5tik
I wrote and published small library for JSON data binding: https://github.com/ko5tik/jsonserializer I uses GSON pull parsing , based on convetions, has small footprint and is good to marshal / unmarshal simple java beans to files. Release 0.6 is available from maven central. regartds, On

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

2011-09-16 Thread Emanuel Moecklin
Here's some code I'm using in my apps: public static byte[] getSerializedObject(Serializable s) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = null; try { oos = new

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

2011-09-15 Thread John Goche
Well, I found the following link: http://www.jondev.net/articles/Android_Serialization_Example_%28Java%29 I guess I won't be using JSON and will serialize accordingly. Now I wonder whether to store the object in a file or in an SQLite database. Since I have a single object I could probably do