0. Introduction I love Jackson parser as it is easy to use and can be used to with some data formats such as CSV , JSON , YAML and XML . Just define a wrapper and a class for marshalling/unmarshalling. Although JAXB is a standard, in the Java ecosystem exists many solutions. And my decision is to use Jackson. 1. Defining MAVEN dependencies To use Jackson XML it is required this dependency in Maven. Note that ${jackson.version} represents a variable that contains preferably the latest Jackson version. 1 2 3 4 5 <dependency> <groupId> com.fasterxml.jackson.dataformat </groupId> <artifactId> jackson-dataformat-xml </artifactId> <version> ${jackson.version} </version> </dependency> But if you want to use CSV, JSON or YAML in the project, it is as easy as including these dependencies 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <!-- Jackson for CSV --> <de...
Comments
Post a Comment