JSON has been around for quite sometime now and lot of languages are offering out of the box support for parsing and creating JSON data. The JDK didn’t have support for parsing and creating JSON data out of the box. One had to make use of libraries for parsing and creating JSON data like Google …
JSON Processing in JavaEE 7- Using Object Model API
In my previous post about JSON processing I introduced you to the sample application and then showed how one can make use of the Streaming API to parse the JSON data. The JSON Streaming API was not suited for scenarios explained in my previous post. In such scenarios one can make use of the Object …
JSON Processing in JavaEE 7- Using Streaming API
If you are wondering what JSON is (Read : What is JSON?), you might want to read this article of mine. Java didn’t have a support for JSON processing out of the box. Developers had to include external libraries to enable JSON processing. But with JSR 353 we have support for JSON processing in Java …
WebSocket Support in Java EE 7
I am going to divide this post into following topics for ease of understanding to the readers: What is a WebSocket? JavaEE 7 Support for creating WebSocket end points Javascript support to create WebSocket client end point What is a WebSocket? It is a feature being introduced as part of the HTML5 specification. It introduces …
Asynchronous Servlet – A new feature in Servlet 3.0 and Java EE 6
When Java EE 6 was announced with a new servlet specification i.e Servlet 3.0 – Asynchronous servlet was a very important feature added to the new specification. Suppose your servlet does a long running task like making a JDBC call or invoking a web service, such operations generally take up a lot of CPU time …
Reading file asynchronously in Java
We all are familiar with reading/writing file in a synchronous way. In Java 7 a new API was added to read/write the contents of the file asynchronously. The API is AsynchronousFileChannel. also read: Java 7.0 Tutorials New Features in Java 7.0 G1 Garbage Collector in Java 7.0 In this example lets look at how to …
How to use ByteBuffer in Java?
ByteBuffer API has been in Java since 1.4. The name itself suggests that these contain bytes of data. The data to be stored in the buffer can be Integer (int, long), Characters (char), Floating value (double), all these are converted into bytes before being stored in the buffer array. ByteBuffer can be of two types- …
Creating JSON using Groovy
I wrote previously about parsing JSON in Groovy. In this article I show a simple example of creating JSON using Groovy. I had to learn about creating JSON using Groovy as I would be using JSON as the response format in the REST API which might be developed sometime in future. also read: Groovy Tutorials …