change getPayload to use rjson::toJSON