Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure pre-formatted JSON data doesn't contain trailing null bytes. (#…
…1332) When serializing Python objects to JSON, `orjson` includes a trailing null byte since it's producing a C-string which is null-terminated. However, when sending HTTP multipart data, we send the JSON with an explicit content length value, so the trailing null byte is neither needed nor expected. So strip the trailing null (if present) before sending `inputs` and `outputs`.
- Loading branch information