Using json payloads the right way