diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java index 3c38f4e31..9122ad261 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java @@ -192,6 +192,7 @@ public class NpmPackage { try { res.readIndexFile((JsonObject) JsonTrackingParser.parseJson(new String(res.content.get("package/.index.json")))); } catch (Exception e) { + TextFile.bytesToFile(res.content.get("package/.index.json"), "c:\\temp\\.index.json"); throw new IOException("Error parsing package/.index.json: "+e.getMessage(), e); } return res; diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageCacheManager.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageCacheManager.java index 95e1d6d68..2fba3ece0 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageCacheManager.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageCacheManager.java @@ -565,7 +565,6 @@ public class PackageCacheManager { if (progress) System.out.println(" done."); - //todo: load dependencies NpmPackage pck = loadPackageInfo(packRoot); if (!id.equals(JSONUtil.str(npm.getNpm(), "name")) || !version.equals(JSONUtil.str(npm.getNpm(), "version"))) { if (!id.equals(JSONUtil.str(npm.getNpm(), "name"))) { diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/json/JsonTrackingParser.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/json/JsonTrackingParser.java index e88f26e55..308710931 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/json/JsonTrackingParser.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/json/JsonTrackingParser.java @@ -370,7 +370,7 @@ public class JsonTrackingParser { JsonTrackingParser self = new JsonTrackingParser(); self.map = map; self.setErrorOnDuplicates(!allowDuplicates); - return self.parse(source); + return self.parse(Utilities.stripBOM(source)); } private JsonObject parse(String source) throws IOException {