Showing posts with label JSON. Show all posts
Showing posts with label JSON. Show all posts

Wednesday, 8 January 2014

Java: taking jsonunicode to Maven central

Sonatype provide the means and instructions to promote open source software to Maven central. I opted to refactor a small library from a previous post on JSON and publish it as a library called jsonunicode.

Wednesday, 4 December 2013

Java: JSON to XML with JAXB and Jackson

Here's a small example demonstrating how to convert JSON to XML using JAXB data binding. You might want to use this over streaming where you want to operate on objects in an intermediary step. It is possible to perform the reverse operation but that is not demonstrated here.

  • Java 7
  • Jackson 2.2
    • jackson-core-2.2.0.jar
    • jackson-databind-2.2.0.jar
    • jackson-annotations-2.2.0.jar
    • jackson-module-jaxb-annotations-2.2.0.jar

Thursday, 6 June 2013

Java: detecting JSON character encoding

JSON documents are generally encoded using UTF-8 but the format also supports four other encoding forms. This post covers the mechanics of character encoding detection for JSON parsers that don't provide handling for them - for example, Gson and JSON.simple.

EDIT: 2014; a version of this library has been published to Maven central.