Category Archives: GSON

Serialize /Convert Map of object to/from JSON in java (GSON /example)

Given the Map of String and object (Map<String,Object>), we would like to convert Map to JSON and vice versa. We will use the Google gson library to achieve serialization and deserialization process. We will create Person class and we will perform the following operations with Person class Convert Map<String,Person> to JSON string Convert the JSON string to Map<String,Person> GSON Maven… Read More »