# Custom Reactive JSON parsing

DevFeed: [Custom Reactive JSON parsing](<https://devfeed.tech/articles/custom-reactive-json-parsing-38647.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2021_06_08_custom_reactive_json_parsing/>)

Published: 2021-06-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [Library](<https://devfeed.tech/topics/library.md>), [Android](<https://devfeed.tech/topics/android.md>), [client](<https://devfeed.tech/topics/client.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [gson](<https://devfeed.tech/tags/gson.md>), [jackson](<https://devfeed.tech/tags/jackson.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [json](<https://devfeed.tech/tags/json.md>), [json-parsing](<https://devfeed.tech/tags/json-parsing.md>), [moshi](<https://devfeed.tech/tags/moshi.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [serialization](<https://devfeed.tech/tags/serialization.md>)

## AI overview

This tutorial introduces JSON parsing in Android applications, compares common libraries, and describes a pet-project weather app that bundles a JSON city list for offline selection. It notes that this approach involves workarounds and would not be suitable for production.

## Source excerpt

Introduction Parsing JSON strings is a must-have on most Android projects that have server-client communication (of course there are some other formats like XML or Protobuf, but I guess JSON is the most common one at least at the moment). Setting up this communication is relatively straightforward: choose a library, add it to a project, describe models, create mappers, and so on. There are a bunch of various libraries to parse JSON: good old Gson, Jackson, or more modern Moshi, kotlinx-serialization and there are more. Set up of these libraries is different, there are differences in the internal implementation, but the general idea is the same for most of them: you can convert JSON-string into a set of objects and vice versa.