Posts Tagged: xml

  • Programming

    Generating POJOs from XML schemas using JAXB XJC

    Posted on by

    A little bit of history XML processing in Java has come a long way in the last ten years.  Back in the old days mapping XML to Java was a bit of a nightmare, deserialising usually meant pulling the DOM apart bit by bit to get at the interesting parts. Serialisation was worse – the… Read more »

  • Programming

    Deserialising JSON or XML to a Map using Java

    Posted on by

    Well, here’s a thing.  Imagine you have some XML or JSON that looks like a map, only you don’t know the names or number of the properties in advance.  For example:

    Or some JSON that looks like this:

    How can you do it?  Using Jackson @JsonAnyGetter and @JsonAnySetter . All you need is the XML root… Read more »