Pregunta

I am a .Net developer who looks a bit at android (using Android Studio). For my Android App I wrote some additional Tools (.NET/Windows) that allow me to save Data in XML-files which contain complex serialized objects created by standard Framework-Methods.

Can I read serialized objects created by the .NET-Framework directly into Android applications? If not: Is there any workaround to "convert" these files?

¿Fue útil?

Solución

There are many ways to do this. A schema may help, depending on approach. One quick/simple way to make POJO from XML on android is to use the simple framework. It takes some extra time to create the class with right extra decoration, then framework will push/pull XML to POJO. Other ways are to use other 3rd party tools to take the XML (or schema) to generate the java classes and what not, but the overhead of deserialization and/or Android availability of the JARs etc may be a headache. That's why/how I ended up using the simple framework.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top