Add syntax checks to the deserializer
- Dominant language
- TypeScript
- Stars
- 154
- Forks
- 57
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Currently the deserializer is mostly concerned about the happy path. Add code that does the same checks as the current SDK does:
Xml syntactic checks
* incorrect/empty namespace . P, R:namespace ignored
* empty attributes . P, R: whitespace,null then value=null
* no attribute, no elements P ->S, R:empty child list, value=null SKIP?
* repeating elements inconsecutively P,->S
* Invalid FHIR Xhtml P ->T
* container resources with attributes . P, R:no contained found
* contained resources with attributes . P, R:no contained found
* container resources with multiple children . P, R:no contained found
Json syntactic checks
* incorrect use of null P, R: skip
* incorrect use/combinations of name and _name . P, R: return main
* incorrect use of arrays for name and _name . P, R:return main
* invalid json token type . P: skip unless some useful content found
* empty string values ->T, p:return null
* non-arrays with null values . P, R:return null
* empty objects . P, R:return null
* obsolete fhir_comments use . P, R:skip
Contributor guide
Assessment
This issue has not been assessed yet.