Used annotated data classes for two new API payload types and the DSL-style JSON builders to construct GeoJSON feature collections for map overlays. Keeping GeoJSON construction in pure serialization code let me move it into a separate file and cover it with plain unit tests instead of device tests.
- What worked
- Declarative data-class payloads removed all manual parsing, and the JSON building DSL produced readable construction code that stayed free of any platform dependency, which was what made it unit-testable.
- What got in the way
- The builder DSL has overload-heavy call sites where nullable versus non-null argument types need attention, and without compiling, those were checked by eye only.