Post

RealmとJSONライブラリ (2015.6 Realm Meetup Japan 2/2)

RealmとJSONライブラリ(Moshi、Gson、Jackson、JsonPullParser)

山﨑誠さん @ 株式会社ウフィカ

株式会社ウフィカ山﨑誠さんに人気の4つのJSONライブラリ(Moshi、Gson、Jackson、JsonPullParser)を使ってRealmのオブジェクトをシリアライズする場合に、それぞれどのように使い勝手や、結果が異なるかについて話していただきました。

記事の更新情報を受け取る

RealmのオブジェクトがPOJO(Plain Old Java Object)でないことにより、JSONライブラリの実装によって、そのまま使って問題の無いライブラリと、特別な対応が必要になるライブラリがあります。よく使われている人気のライブラリでもRealmと単純に組み合わせると期待通りに動かなかったりすることがあります。

ここでは人気のある4つのライブラリ(Moshi、Gson、Jackson、JsonPullParser)について、RealmオブジェクトをJSONに変換する際に、相性が良い(何もしなくても期待通り動く)ものは何か、実装のコストや使い勝手はどのように異なるのか、などアプリを作る過程で誰もが必ず悩む問題について非常によく整理してくださっています。JSONライブラリの良い紹介にもなっている、必見の講演です。

About the content

This content has been published here with the express permission of the author.

Realm Team

At Realm, our mission is to help developers build better apps faster. We provide a unique set of tools and platform technologies designed to make it easy for developers to build apps with sophisticated, powerful features — things like realtime collaboration, augmented reality, live data synchronization, offline experiences, messaging, and more.

Everything we build is developed with an eye toward enabling developers for what we believe the mobile internet evolves into — an open network of billions of users and trillions of devices, and realtime interactivity across them all.

4 design patterns for a RESTless mobile integration »

close