Adds a helper for serializing JSON requests.