开发者

.NET XMLSerializer equivalence in Java/Android?

开发者 https://www.devze.com 2023-03-12 12:33 出处:网络
I\'ve Googled the XMLSerializer in Android, but I found it\'s totally different from .NET. What I need is that, from a Serializable Class, I can write them to a XML file, and then read the 开发者_运维

I've Googled the XMLSerializer in Android, but I found it's totally different from .NET. What I need is that, from a Serializable Class, I can write them to a XML file, and then read the 开发者_运维知识库XML file to return the class's properties values automically.

I need that because: I'm creating a game for Android, with a lot of settings and levels, so I design them by a editor made by .NET. Now I want that the XML file can be read by both the editor (by .NET) and the game (by Java/Android SDK). The class should be totally the same (all the properties, methods, names, ...).

Thanks for reading.


Check out this answer. Sounds similar to the jackson parser bindings, which can serialize and unserialize Java objects and beans to/from JSON.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号