diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java index 42846d7dd11..bdad87494d0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java @@ -96,12 +96,12 @@ public class ValidationContext extends BaseValidationContext implements IV IEncoder encoder = new IEncoder() { @Override public String encode() { - return theContext.newXmlParser().encodeResourceToString(theResource); + return theContext.newJsonParser().encodeResourceToString(theResource); } @Override public EncodingEnum getEncoding() { - return EncodingEnum.XML; + return EncodingEnum.JSON; } }; return new ValidationContext<>(theContext, theResource, encoder, options);