简体   繁体   English

在PC上序列化,在Android手机上反序列化?

[英]Serialize on a PC, deserialize on an android phone?

Is it possible to serialize an object on a pc, send it through a socketed connection to an android phone and then deserialize it and use it on the phone? 是否有可能在PC上序列化对象,通过套接字连接将其发送到android手机,然后反序列化它并在手机上使用它? I read somewhere that there might be an issue with the JVM version but didnt fully understand what the issue might be. 我在某处读到JVM版本可能有问题,但并没有完全了解问题可能是什么。

您可以依靠一个事实,即JSON应该在标准级别(而不是在库实现中)处理这些东西

Theoretically, it's no problem. 从理论上讲,这没问题。 Think about applet... Byte codes could be transported via net and then be executed by remote client jvm. 考虑一下applet ...字节码可以通过net传输,然后由远程客户端jvm执行。 However, JVM has different implementation following some specification (***JSR). 但是,JVM遵循某些规范(*** JSR)具有不同的实现。 As a result, it's possible that some codes run into problem in different jvm. 结果,某些代码可能会在不同的jvm中出现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM