Skip to content

Support Other JSON Content-Types in content_type.go #1273

@Evynglais

Description

@Evynglais

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions