Skip to main content
PCSalt
YouTube GitHub

# json

12 posts

JSON Parsing in Kotlin — Parsing with Kotlin Serialization

Parse a complex JSON response using Kotlin Serialization — the Kotlin-native, compile-time safe approach with no reflection.

JSON Parsing in Kotlin — Which Library Should You Use?

A side-by-side comparison of org.json, Gson, Moshi, Kotlin Serialization, and Jackson for JSON parsing in Kotlin.

JSON Parsing in Java — Which Library Should You Use?

A side-by-side comparison of org.json, Gson, Moshi, and Jackson for JSON parsing in Java — with recommendations for Android, backend, and new projects.

JSON Parsing in Kotlin — Parsing with Jackson

Parse a complex JSON response using Jackson with the Kotlin module — the server-side powerhouse that's also the default in Spring Boot.

JSON Parsing in Java — Parsing with Jackson

Parse a real-world JSON response using Jackson in Java 21. ObjectMapper, annotations, and the JavaTimeModule for dates.

JSON Parsing in Kotlin — Parsing with Moshi

Parse a complex JSON response using Moshi with Kotlin data classes, codegen, and proper null safety. The recommended JSON library for modern Android.

JSON Parsing in Java — Parsing with Moshi

Parse a real-world JSON response using Moshi in Java 21. Clean annotations, custom adapters, and built-in null safety.

JSON Parsing in Kotlin — Parsing with Gson

Parse a complex JSON response using Gson with Kotlin data classes. Automatic mapping, @SerializedName, nullable types, and a custom TypeAdapter for Instant.

JSON Parsing in Java — Parsing with Gson

Parse a real-world JSON response using Gson in Java 21. Automatic mapping, annotations, and custom adapters — the easy way.

JSON Parsing in Kotlin — Manual Parsing with org.json

Parse a complex, real-world JSON response manually using org.json in Kotlin. Extension functions help, but the verbosity is still real.

JSON Parsing in Java — Manual Parsing with org.json

Parse a complex, real-world JSON response manually using org.json in Java 21. Every getString, every null check, every nested loop — the hard way.

Convert JSON to comma-separated key=value pairs — Java

Recursively flatten a nested JSON object into a compact comma-separated key=value string in Java.