Tuesday, 14 June 2011

Maven POM Settings for JSON APIs

Having talked about JSON and XML yesterday, I mentioned that there are a number of successful APIs available for both data interchange systems. The two APIs I’ve used for JSON are JSON in Java available from the JSON website and the JSON-Simple API from Google.

Just as a quick note, below are the maven details for both:

JSON in Java

<dependency>
        <!-- See: http://www.json.org/java/index.html  -->
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20090211</version>
    </dependency>  

JSON Simple

<dependency>
        <!-- http://code.google.com/p/json-simple/ -->
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1</version>
    </dependency>

Remember to check the version numbers before cutting an pasting the above into your pom.xml; they may be no longer the most recent versions.

No comments: