Enjoy self-explanatory, Java EE 7 code :-): import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import javax.json.Json; import javax.json.JsonObject; import javax.json.JsonReader; import javax.json.JsonWriter; //... JsonObject deserialize(byte[] content) throws IOException { try (ByteArrayInputStream bais = new ByteArrayInputStream(content); JsonR