Android 与 Restlet/JSON/Jackson 的兼容性

发布于 2024-09-04 09:53:33 字数 306 浏览 2 评论 0原文

我目前正在开发 Android 的网络服务客户端。我正在使用一个 Java 客户端库,它提供了与服务交互的抽象。客户端库可以在普通机器上运行。但是,当我在 Android 项目中使用这些类时,某些调用不会在 Android 上返回结果,后台服务会在第一个命令处停止工作。 Wireshark 显示了 tcp 交换,服务器获取请求。没有例外或任何事情。序列化/反序列化中的某些内容似乎不起作用。我正在使用最新版本的 Jackson 库(1.5.3)和 android 版本中的 Restlet jar。 Jackson 和 Android 是否存在任何已知问题?哪些代码和库与 Android 兼容?

I'm currently working on a webservice-client for Android. I'm using a Java client library which provides an abstraction for interaction with the service. The client library works on normal machines. However, when I use the classes in my Android project, some calls don't return a result on Android, the background-service stops working at the first of those commands. Wireshark shows a tcp exchange, the server gets the requests. There is no exceptions or anything. Something in the serialization/deserialization seams not to work. I'm using the newest version of Jackson libraries (1.5.3) and the restlet jar in the android edition. Is there any known problems with Jackson and Android? Which code and libraries are compatible with Android?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

猫九 2024-09-11 09:53:33

我更喜欢使用 Gson 来解析 POJO 的 JSON 响应。我发现它更容易和直接。这个问题的答案可能会给您更多选择。

是否存在任何已知问题
杰克逊和安卓?

据我所知是没有的。

I prefer using Gson for parsing JSON responses to POJO's. I find it easier and straightforward. The answers to this question may give you more options.

Is there any known problems with
Jackson and Android?

As far as I know there isn't any.

靖瑶 2024-09-11 09:53:33

据我所知,后来的 Jackson 版本(包括 1.5 和最近发布的 1.6)在 Android 上运行得很好:方便、高效。

为了获得最佳兼容性,1.6.1 进行了一些进一步的改进,以减少初始化期间的警告(用于抱怨缺少 javax.xml 和 Joda 类,不再是了)

As far as I know, later Jackson versions (including 1.5 and recently released 1.6) work just fine on Android: conveniently and efficiently.

For best compatibility 1.6.1 has some further improvements to reduce warnings during initialization (used to complain about missing javax.xml and Joda classes, not any more)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文