FHIR Chat · Question from application/fhir+json registration · implementers

Stream: implementers

Topic: Question from application/fhir+json registration


view this post on Zulip Grahame Grieve (Jan 26 2018 at 19:14):

In our document for 'application/fhir+json', we say:

view this post on Zulip Grahame Grieve (Jan 26 2018 at 19:15):

Since the HTTP specification (section 3.7.1) defines a default character encoding of ISO-8859-1, requests and responses SHOULD explicitly set the character encoding to UTF-8 using the charset parameter of the MIME-type in the Content-Type header for XML and Turtle, and MAY do this for JSON and ND-JSON. Requests MAY also specify this charset parameter in the Accept header and/or use the Accept-Charset header.

view this post on Zulip Grahame Grieve (Jan 26 2018 at 19:15):

the IESG technical says:

view this post on Zulip Grahame Grieve (Jan 26 2018 at 19:15):

"application/json doesn't define a charset parameter, so if you want to define one you will have to specify it yourself. However, I strongly recommend dropping the parameter since it's not needed."

view this post on Zulip Grahame Grieve (Jan 26 2018 at 19:15):

does anyone have any opinions on this?

view this post on Zulip Grahame Grieve (Jan 27 2018 at 23:36):

none. I'm just going to decide then: no charset on json mime type

view this post on Zulip Jenni Syed (Jan 27 2018 at 23:39):

I didn't realize that app/json didn't specify it at all. We do return it today to help differentiate between different unicode encodings

view this post on Zulip Jenni Syed (Jan 27 2018 at 23:39):

though we never return anything other than utf-8 right now :)

view this post on Zulip Jenni Syed (Jan 27 2018 at 23:39):

But we have seen people do weird things w/json (like trying to return it in non-unicode, which they're not supposed to do)

view this post on Zulip Grahame Grieve (Jan 27 2018 at 23:44):

https://stackoverflow.com/questions/9254891/what-does-content-type-application-json-charset-utf-8-really-mean

view this post on Zulip Grahame Grieve (Jan 27 2018 at 23:44):

we'll define our own charset parameter to be sure


Last updated: Apr 12 2022 at 19:14 UTC