rollbar / rollbar-ios

Objective-C library for crash reporting and logging with Rollbar.

Home Page:https://docs.rollbar.com/docs/ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build JSON serializable base for Rollbar DTOs

akornich opened this issue · comments

Current payload implementation is not a custom type based but is a structure of basic JSON serializable Objective-C primitive and collection types - the only types that can be de/serialized by the NSJSONSerialization class: https://developer.apple.com/documentation/foundation/nsjsonserialization
The structure could be only "navigated" based on the string-based keys. That is not a very developer-friendly implementation.
Let's build an infrastructure/foundation for defining DTOs (payloads and configurations) that could be implemented as custom types (with clearly defined properties instead of key-value pairs) but at the same time de/serializable by NSJSONSerialization class.
Reimplementing RollbarConfiguration based on this infrastructure would enable us to implement #194