Home » Tag Archives: Gson

Tag Archives: Gson

Using Google GSON : Extra Goodies : Part I

json-logo

Introduction This is follow-up article to previous Getting Started with Google GSON where it shows the introductory material on using the Google Gson. This article shows some extra goodies of GSON library. As there are lot of things to write about these extra goodies, so i splitted long article into 2 article series, So, this part one of it and ...

Read More »

Using Google GSON : Extra Goodies : Part II

json-logo

We continue with Using GSON from last article, also in case you missed the first article in series here is link. So, here we go with another installment in series. Versioning Support If you want to maintain multiple versions of an object for JSON conversion, Google GSON library has nice @Since annotation for it. This annotation can be applied to ...

Read More »

Getting Started with Google GSON

java-interview-questions-answers

In Java world,  JSON is becoming de facto standard for data exchange format over XML because of its ease of use and efficiency in terms of transferring it. If you don’t know about JSON, it is Javascript object notation, a text based data exchange format which is collection of name-value where name is strictly of string type and value can ...

Read More »

Parsing ESPN API using Java and Google GSON

json-logo

For my first post, I’ll explain how to parse the ESPN API.  The API documentation can be found at http://developer.espn.com/docs. Firstly, you’ll need to request an API key, then you can start querying the REST API to retrieve the JSON response.  In the following example, I’m going to query simply for all the players in the sport of “Soccer” (dam ...

Read More »

Prime-UI, JAX-RS with Jersey and Gson on Oracle Cloud

primefaces-logo

The Oracle Cloud is around everywhere these days. It had a rough start with Larry denying the need for a cloud for a very (too) long time and some very early announcements and a very bad availability after last year’s Open World nobody seems to be interested anymore. But for me it still has it’s hidden treasures and I believe ...

Read More »

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 »

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 »

Android JSON Parsing with Gson Tutorial

json-logo

Apart from XML, JSON is a very common format used in API responses. Its simplicity has helped to gain quite the adoption in favor of the more verbose XML. Additionally, JSON can easily be combined with REST producing clear and easy to use APIs. Android includes support for JSON in its SDK as someone can find in the JSON package ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close