Hi,
At the moment, isJSON(contentType string) bool in content_type.go only allows a specific subset of JSON Content-Types*. This means (for example), we are unable to use application/protobuf+json unless we escape the data and pass it as a single string element.
*ApplicationJSON, TextJSON, ApplicationCloudEventsJSON, ApplicationCloudEventsBatchJSON
This list of types should be expanded (or preferably, the method refactored to avoid hard-coding a list of strings) so a more generic set of JSON Content-Types can be supported. Alternatively, a way to register our own Content-Type so that it can be treated as a JSON object rather than a string.
Thanks,
Evynglai
Hi,
At the moment,
isJSON(contentType string) boolin content_type.go only allows a specific subset of JSON Content-Types*. This means (for example), we are unable to useapplication/protobuf+jsonunless we escape the data and pass it as a single string element.*ApplicationJSON, TextJSON, ApplicationCloudEventsJSON, ApplicationCloudEventsBatchJSON
This list of types should be expanded (or preferably, the method refactored to avoid hard-coding a list of strings) so a more generic set of JSON Content-Types can be supported. Alternatively, a way to register our own Content-Type so that it can be treated as a JSON object rather than a string.
Thanks,
Evynglai