# square/moshi

A modern JSON library for Kotlin and Java.

Repository: https://github.com/square/moshi
Canonical: https://ross.abutalabs.com/products/square-moshi
Homepage: https://square.github.io/moshi/1.x/
Language: Kotlin
License: Apache-2.0
License Family: permissive
Last push: 2026-08-25T13:50:46+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 4407, "days_push": 8, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10155, forks 813 (observed 2026-08-28T04:10:39.706895+00:00)

## What it is
Moshi is a modern JSON serialization library for Kotlin and Java, with built-in type adapters and optional Kotlin code generation. It converts JSON to and from Java/Kotlin objects with a simple adapter-based API.

## Use cases
- parse json into kotlin data classes
- serialize java objects to json
- json parsing on android
- convert rest api responses to models
- kotlin json serialization with codegen
- read and write json in jvm apps

## When to choose
- you need JSON serialization on Android or the JVM in Kotlin or Java
- you want type-safe, reflection-free codegen for Kotlin classes
- you need a lightweight alternative to Gson with better Kotlin support

## When to avoid
- you need non-JSON formats like XML or protobuf
- you want a multiplatform Kotlin serialization library beyond the JVM
- your project is not on the JVM

## Facets
- artifact type: library
- maturity: stable
- function: serialization, parser
- domain: developer-tools, mobile-development, backend
- platform: jvm
- tags: json, kotlin, android, code-generation, type-adapters

## Member repositories
- square/moshi (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:39.706895+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:19:40.642175+00:00, confidence not recorded.
  - readme: https://github.com/square/moshi (fetched 2026-08-28T04:10:39.706895+00:00, sha 293340172804)
  - homepage: https://square.github.io/moshi/1.x/ (fetched 2026-08-29T08:19:14.400837+00:00, sha 0d821c683798)
- Data as of 2026-08-30T08:39:29.467469+00:00.
