Description
Description
I have a situation where I would like to serialize json responses for NON json:api endpoints in a different way than for that of json:api endpoints.
As it stands now, the json:api library registers an IOutputFormatter that is called for json serialization when the content type is null or it equals the "application/vnd.api+json" content type.
This might be ok for most situations, but in our situation, we don't use json:api for all endpoints that return json payloads.
Would it not make most sense to run the json serialization code registered by the json:api library only when requests come in with content type or accept header with the value "application/vnd.api+json"?
We've had to fork the library and make modifications to JsonApiOutputFormatter.cs so that the json serialization registered by the json:api library is not run (and therefore are default serialization code is run) when the content-type header is null.
Environment
- JsonApiDotNetCore Version: 3.1.0.0