remove dependency on GSON
This commit is contained in:
parent
7c78bdd59c
commit
a381998500
|
@ -198,7 +198,6 @@ import org.hl7.fhir.validation.instance.utils.ResourceValidationTracker;
|
||||||
import org.hl7.fhir.validation.instance.utils.ValidatorHostContext;
|
import org.hl7.fhir.validation.instance.utils.ValidatorHostContext;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4617,11 +4616,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
} else {
|
} else {
|
||||||
expression.append(" and (");
|
expression.append(" and (");
|
||||||
if (fixed instanceof StringType) {
|
if (fixed instanceof StringType) {
|
||||||
Gson gson = new Gson();
|
String es = Utilities.escapeJson(fixed.primitiveValue());
|
||||||
String json = gson.toJson((StringType) fixed);
|
expression.append("'" + es + "'");
|
||||||
String escapedString = json.substring(json.indexOf(":") + 2);
|
|
||||||
escapedString = escapedString.substring(0, escapedString.indexOf(",\"myStringValue") - 1);
|
|
||||||
expression.append("'" + escapedString + "'");
|
|
||||||
} else if (fixed instanceof UriType) {
|
} else if (fixed instanceof UriType) {
|
||||||
expression.append("'" + ((UriType) fixed).asStringValue() + "'");
|
expression.append("'" + ((UriType) fixed).asStringValue() + "'");
|
||||||
} else if (fixed instanceof IntegerType) {
|
} else if (fixed instanceof IntegerType) {
|
||||||
|
|
Loading…
Reference in New Issue