Stream: implementers
Topic: Removal of byte order mark in json schemas
Omar El-Begawy (Apr 10 2017 at 12:46):
Schemas for JSON example resources can be downloaded here: http://www.hl7.org/FHIR/downloads.html
I have used these schemas to build an automatic validation system for example resources. The schema files contain a byte order mark (BOM), which can also be seen as <U+FEFF> in some editors. Unfortunately the BOM makes the json validators fail because the BOM is not part of the json spec. I have made my system work by manually removing the BOM, but this can cause errors later on if the schema files are changed and the person who does that has no knowledge of the BOM.
Would it be possible to remove the BOM from json schema files in the future, or is there a reason for its inclusion?
Grahame Grieve (Apr 14 2017 at 21:06):
well, I can remove it. But BOM is part of the json spec because JSON uses unicode, and BOM is part of the unicode format. Any JSON tool that doesn't support BOM has a bug and you should report it
Ben Spencer (Apr 18 2017 at 08:42):
https://tools.ietf.org/html/rfc7159#section-8.1
Grahame Grieve (Apr 18 2017 at 09:36):
oh. I had not seen that piece of text
Last updated: Apr 12 2022 at 19:14 UTC