When we have a determined/unchanging schema for how the context 'co' is going to be set, we should consider refactoring our 0.1 implementation to be configurable or generic. Right now, it feels a bit hard coded and ugly to read.
Early thoughts:
SnowplowPayload should be an object which always has schema with data configurable as an array or object.
This would let us have nested payloads (see example payload below)
[x] Fix inheritance from NSDictionary
[x] Add inits with default schema
[x] Solve how to make data optionally a dictionary or array ( EDIT: Use type id and check with [myObject isKindOfClass:[NSDictionary class]] )
When we have a determined/unchanging schema for how the context 'co' is going to be set, we should consider refactoring our 0.1 implementation to be configurable or generic. Right now, it feels a bit hard coded and ugly to read.
Early thoughts:
schema
withdata
configurable as an array or object.schema
data
optionally a dictionary or array ( EDIT: Use typeid
and check with[myObject isKindOfClass:[NSDictionary class]]
)