Posted In: GSON, JSON

GSON – How to parse input JSON with keys as JAVA reserved keyword

Use com.google.gson.annotations.SerializedName annotation to map json key with POJO field

Read More

Tags:

by , on February 23rd, 2018

Posted In: GSON, JSON

Gson – Deserialize json array to list generic type

Converting JSON array to ArrayList<generic> can be achieved using com.google.gson.reflect.TypeToken

Read More

Tags:

by , on February 22nd, 2018

Posted In: GSON, JSON

GSON – How to exclude fields during serialization/toJSON using JsonSerializer

Use com.google.gson.JsonSerializer to add only required fields Output maiingAddress is excluded

Read More

Tags: Tags:

by , on February 22nd, 2018

Posted In: GSON, JSON

GSON – How to exclude fields during serialization/toJSON

Use com.google.gson.annotations.Expose to exclude Output maiingAddress is excluded

Read More

Tags:

by , on February 22nd, 2018

Posted In: GSON, JSON

GSON – Resolving Expected BEGIN_OBJECT but was BEGIN_ARRAY exception

Code will throw following error com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 13 path $.student at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) To resolve either POJO or input JSON needs to be corrected

Read More

Tags:

by , on February 22nd, 2018

Posted In: GSON, JSON

GSON TypeAdapter – How to process large JSON file

I have successfully tried this code with 90K records. This is useful in following scenarios When it is impossible or undesirable to load the entire object model into memory. This is most relevant on mobile platforms where memory is limited. When it is necessary to read or write a document before it is completely available. […]

Read More

Tags: Tags:

by , on February 21st, 2018

Posted In: Micro, Service

Micro services – configuration management using CONSUL

This post shows one of the ways to create micro services architecture with enterprise level configuration services Steps 1. Start consul. (Click on consul.exe on windows) 2. Add consul-api java client library to maven 3. Add and fetch configuration parameters

Read More

Tags: Tags:

by , on February 20th, 2018

Posted In: Micro, Service

Micro services – configuration management using ETCD

This post shows one of the ways to create micro services architecture with enterprise level configuration services Steps 1. Start etcd service. (Click on etcd.exe on windows) 2. Add jetcd java client library to maven 3. Add and fetch configuration parameters

Read More

Tags: Tags:

by , on February 13th, 2018

Posted In: Database

How to concatenate db columns

MySQL Oracle PostgreSQL MongoDB

Read More

Tags:

by , on November 20th, 2017

Posted In: Bootstrap

Bootstrap 3 – Modal

How to open/close modal with javascript How to disable click outside of modal area to close modal How to remove grey area outside Modal window How to pass data to a modal Attach function to modal close event Modal dialog HTML full example

Read More

Tags: Tags:

by , on September 21st, 2017