Handling JSON in Ktor without Manual String Parsing
Stop manually parsing JSON strings in Ktor. Learn how to use the ContentNegotiation plugin with kotlinx.serialization to automate data conversion between HTTP bodies and Kotlin objects.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop manually parsing JSON strings in Ktor. Learn how to use the ContentNegotiation plugin with kotlinx.serialization to automate data conversion between HTTP bodies and Kotlin objects.
Replace nested callbacks with Kotlin coroutines and Flow to build declarative, lifecycle‑aware reactive pipelines. A concrete repository‑to‑UI example shows the pattern and its trade‑offs.
Replace System.out.println calls across a codebase with SLF4J using IntelliJ's AST‑based Structural Search and Replace.
Configure Ktor's Content Negotiation plugin with kotlinx.serialization for automatic JSON, XML, and Protobuf request/response handling. Covers plugin setup, format selection, worked example, and pitfalls like missing @Serializable, strict unknown-key handling, and memory buffering.
Implement state hoisting in Jetpack Compose to build stateless, reusable components that are easier to test and maintain.
Learn how Ktor 2.x's ContentNegotiation plugin provides engine-independent JSON serialization with kotlinx.serialization, including a sealed-class example, migration gotchas from Ktor 1.x, and a verification checklist.
Learn how to author IntelliJ‑style inspections as Qodana plugins, test them locally, and drop them into your CI pipeline with minimal effort. A hands‑on example shows a rule that flags any method named "foo".
Model mutually exclusive UI states with Kotlin sealed types so the compiler flags missing branches instead of letting invalid states slip through runtime.
Learn how Android WorkManager provides reliable, constraint‑aware background work that survives app restarts and reboots, with a concrete nightly sync example and practical verification steps.