Stream: hapi
Topic: java help required
Grahame Grieve (Jul 04 2019 at 00:10):
https://github.com/hapifhir/org.hl7.fhir.core/issues/50 is actually caused by an error in my understanding.
Grahame Grieve (Jul 04 2019 at 00:11):
in order to preserve line numbers when parsing json, I parse the json myself when validating, and build a Map<JsonElement, LineInfo> where JsonElement is a GSON element
Grahame Grieve (Jul 04 2019 at 00:11):
the problem is that GSON JsonPrimitive overrides .equals() so that later json elements override earlier ones.
Grahame Grieve (Jul 04 2019 at 00:11):
I want a Map<> that ignores that definition of .equals()... but there isn't such a thing, is there?
Grahame Grieve (Jul 04 2019 at 00:20):
ah - IdentityHashMap.
Last updated: Apr 12 2022 at 19:14 UTC