Implementation of JsonSerializedPayload to allow easy object payloads.