~/talk

Upgrading to Moshi

Talkat droidcon San Francisco 2017 · 2017-11-05..11-06· [android, databases]
links:none on file
slides:none on file

Moshi bills itself as Gson 3 and claims a smaller, safer replacement: it uses Okio to share buffer segments and cut method count roughly in half (binary ~188 KB for Gson vs smaller Moshi footprint), adds an options-based streaming API to avoid string allocations, and provides setFailOnUnknown to surface unexpected fields. It throws JSON data exceptions for unknown enum values, offers a Kotlin JsonAdapter that preserves defaults and nullability rules, and integrates with Retrofit and AutoValue.

AI-written summary · about

  1. 0:00Intro
  2. 3:02Why update from Gson?
  3. 9:08Moshi optimizations
  4. 11:30FieldNaming Policy
  5. 12:42Reflective field renaming
  6. 15:09Streaming API
  7. 15:52JsonReader Options
  8. 16:35setFailOnUnknown
  9. 21:58Object Mapping without Footgun
  10. 26:43Object Mapping Unknown Enums
  11. 29:37Object Mapping with JsonQualifiers
  12. 34:21Even Easier JsonAdapters
  13. 35:58Polymorphic Types
  14. 41:40Retrofit
  15. 43:11Auto-Value-Moshi
  16. 44:40KotlinsonAdapter
  17. 48:07Resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.