- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Raja has Published 760 Articles
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
4K+ Views
The Jackson Annotation @JsonProperty is used on a property or method during serialization or deserialization of JSON. It takes an optional ‘name’ parameter which is useful in case the property name is different than ‘key’ name in JSON. By default, if the key name matches the property name, value is mapped to property value.In ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
2K+ Views
The Gson library can be used to parse a JSON String into a Tree Model. We can use the JsonParser to parse the JSON string into a Tree Model of type JsonElement. The getAsJsonObject() method of JsonElement can be used to get the element as JsonObject and getAsJsonArray() method of JsonElement can be used to get the element ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
1K+ Views
The Jackson is a library for Java and it has very powerful data binding capabilities and provides a framework to serialize custom java objects to JSON and deserialize JSON back to Java object. The Jackson library provides @JsonInclude annotation that controls the serialization of a class as a whole or its ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
232 Views
The Flexjson is a lightweight Java library for serializing and de-serializing java beans, maps, arrays, and collections in a JSON format. A JSONSerializer is the main class for performing serialization of Java objects to JSON and by default performs a shallow serialization. We can pretty-print JSON using the prettyPrint(boolean prettyPrint) method of JSONSerializer class.Syntaxpublic JSONSerializer prettyPrint(boolean prettyPrint)In ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
4K+ Views
The Flexjson is a lightweight library for serializing and deserializing Java objects into and from JSON format allowing both deep and shallow copies of objects. In order to run a Java program with flexjon, we need to import a flexjson package. We can deserialize a JSON to Java object using the deserialize() method of JSONDeserializer class, ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
2K+ Views
While parsing JSON String to or from Java object, By default Gson try to create an instance of Java class by calling the default constructor. In the case of Java class doesn’t contain default constructor or we want to do some initial configuration while creating Java objects, we need to ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
6K+ Views
By default, the Gson object does not serialize the fields with null values to JSON. If a field in a Java object is null, Gson excludes it. We can force Gson to serialize null values via the GsonBuilder class. We need to call the serializeNulls() method on the GsonBuilder instance before creating the Gson ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
103 Views
The Gson library provides a simple versioning system for the Java objects that it reads and writes and also provides an annotation named @Since for the versioning concept @Since(versionnumber).We can create a Gson instance with versioning using the GsonBuilder().setVersion() method. If we mentioned like setVersion(2.0), means that all the fields having 2.0 or less ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
5K+ Views
A Gson is a JSON library for Java, which is created by Google. By using Gson, we can generate JSON and convert JSON to java objects. We can create a Gson instance by creating a GsonBuilder instance and calling with the create() method. The GsonBuilder().setDateFormat() method configures Gson to serialize Date objects according to the ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
9K+ Views
The JSON is a lightweight, text-based and language-independent data exchange format. A.JSONObject can parse text from a string to produce a map-like object. The object provides methods for manipulating its contents, and for producing a JSON compliant object serialization. The files in the org.json package implement JSON encoders/decoders in Java. It also includes the capability to ... Read More