Home » Tag Archives: JSON (page 5)

Tag Archives: JSON

JSON with GSON and abstract classes

json-logo

I have switched to Google Gson after many years of using org.json library for supporting JSON data interchange format in Java. org.json is a lower-level library, so that you have to create JSONObject, JSONArray, JSONString, … and do other low-level work. Gson simplifies this work. It provides simple toJson() and fromJson() methods to convert arbitrary Java objects to JSON and ...

Read More »

MOXy as Your JAX-RS JSON Provider – Client Side

json-logo

Recently I posted how to leverage EclipseLink JAXB (MOXy)‘s JSON binding to create a RESTful service.  In this post I will demonstrate how easy it is to take advantage of MOXy’s JSON binding on the client side. MOXy as Your JAX-RS JSON Provider – Server Side MOXy as Your JAX-RS JSON Provider – Client Side URI This post will focus ...

Read More »

MOXy as Your JAX-RS JSON Provider – Server Side

json-logo

In a previous series of posts I covered how EclipseLink JAXB (MOXy) can be leveraged to create a RESTful data access service. In this post I will cover how easy it is to leverage MOXy’s new JSON binding on the server side to add support for JSON messages based on JAXB mappings. MOXy as Your JAX-RS JSON Provider – Server ...

Read More »

Play 2.0: Akka, Rest, Json and dependencies

json-logo

I’ve been diving more and more into scala the last couple of months. Scala together with the “Play Framework” provides you with a very effective and quick development environment (as soon as you’ve grasped the idiosyncrasies of the Scala language, that is). The guys behind the Play framework have been hard at work at the new version Play 2.0. In ...

Read More »

Groovy 1.8.0 – meet JsonBuilder!

json-logo

Groovy 1.8.0 released in April brought a lot of new features to the language, one of them is native JSON support through JsonSlurper for reading JSON and JsonBuilder for writing JSON. I recently used JsonBuilder in one of my projects and initially experienced some difficulties in understanding how it operates. My assumption was that JsonBuilder works similarly to MarkupBuilder but ...

Read More »

JSON web service with Java and Axis2

json-logo

I have recently met a client who asking me to rebuild their legacy product using Java web service. They want it modular and easy to use. The first thing crossed my mind is using restful approach. But there is only thing that bothers me, Java restful approach is using XML!, I would prefer a simpler way to communicate, easy to ...

Read More »

DB unit testing with dbUnit, JSON, HSQLDB and JUnit Rules

dbunit-logo

In this week’s run of my TDD course, I thought it would be interesting to write a little fixture to make it easier to use dbUnit. My original thought was just to teach dbUnit about JSON, but it turns out that Lieven Doclo has done that already. So I decided to go a step further and also combine dbUnit with ...

Read More »

Develop Restful web services using Spring MVC

json-logo

REST INTRODUCTION From Wikipedia: REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of representations of resources. A resource can be essentially any coherent and meaningful concept that may be addressed. As you have read the most important thing in Rest architecture ...

Read More »

Cloning of Serializable and Non-Serializable Java Objects

json-logo

Frequently developers rely on 3d party libraries to avoid reinventing the wheel, particularly in the Java world, with projects like Apache and Spring so prevalent. When dealing with these frameworks, we often have little or no control of the behaviour of their classes. This can sometimes lead to problems. For instance, if you want to deep clone an object that ...

Read More »

Android JSON Parsing with Gson Revisited

json-logo

A while ago we hosted an article about using Gson for JSON parsing with Android. The tutorial was a simple showcase of how to leverage Gson with Android. Recently, Bill Mote from the AYDABTU Development site contacted me and informed me that he had used our sample code in one of his Android applications, namely Broadcast SMS. More specifically, he ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.