Hi James,
Thanks for the clarification. I tried using a Parser Error Handler with a lenient parser and overridden methods to capture parser issues into an OperationOutcome, but it did not catch certain structural errors in my FHIR JSON.
Examples not caught by the Bundle option but detected when passing the raw JSON:
Address object vs array mismatch:
"address": [
{
"use": "work",
"city": "Verona",
"line": ["2025 Milky Way"],
"text": "2025 Milky Way Verona, WI 53593-2222",
"state": "WI",
"country": "USA",
"district": "DANE",
"postalCode": "53593-2222"
}
]It seems that once the JSON is parsed, the original structure is lost, preventing both the parser error handler and HAPI FHIR validator from detecting these issues.
Would passing the raw JSON directly to the validator be a good approach to catch these structural problems? Do you have any recommendations or best practices for this?
Thanks,
Vinod A