Instant GSON by Unknown

Instant GSON by Unknown

Author:Unknown
Language: eng
Format: epub
Publisher: Packt Publishing


The output of the previous code is as follows:

{ "courseName": "M.TECH.", "duration": "120 hr" } Course : M.TECH.Duration : 120 hr

In the previous code, Course is a static nested class inside the Student class. courseName and duration are two properties, and their respective getter and setter methods are present in it. A static inner class can be instantiated in Java by calling the outer class with a dot operator. The line Student.Course aCourse = new Student.Course() is for initializing the nested class course. M.TECH. and 120 hr are two values used to instantiate it. From the output, it is evident that GSON is able to serialize the static nested class that produces the JSON representation of the Course object. The last line of the output shows that GSON has successfully deserialized it.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
SvelteKit Up and Running by Dylan Hildenbrand(6347)
Building Blazor WebAssembly Applications with gRPC by Václav Pekárek(3704)
Hands-On Application Development with PyCharm by Bruce M. Van Horn II
 Quan Nguyen(2192)
Designing Web APIs with Strapi: Get started with the Strapi headless CMS by building a complete learning management system API by Khalid Elshafie Mozafar Haider(1054)
Django 4 for the Impatient. Learn the core concepts of Python web development with Django in one weekend by G. Lim D. Correa(909)
Vue.js 3 Design Patterns and Best Practices by Pablo David Garaguso(850)
Accelerating Server-Side Development with Fastify by Manuel Spigolon & Maksim Sinik & Matteo Collina(849)
Drupal 10 Module Development - Fourth Edition by Daniel Sipos(766)
Mastering CSS Grid by Thormeier Pascal;(728)
Going the Distance with Babylon.js: Building extensible, maintainable, and attractive browser-based interactive applications using JavaScript by Josh Elster(700)
Simplifying State Management in React Native by Aleksandra Desmurs-Linczewska(618)
Java Memory Management by Maaike van Putten & Seán Kennedy(548)
Hands-On Application Development with Pycharm by II Bruce M. Van Horn;Nguyen Quan;(530)
Joomla!® Explained: Your Step-by-Step Guide (Joanne Romanovich's Library) by Stephen Burge(323)
Python & JavaScript Mastery: 2 Books In 1- Learn And Master Two Powerful Programming Languages by Alex iversion(311)
Beginning Modern JavaScript: A Step-By-Step Gentle Guide to Learn JavaScript for Beginners (Code With Nathan) by Sebhastian Nathan(261)
Understanding JavaScript Promises by Nicholas C. Zakas(250)
Create GUI Applications with Python & Qt6: The hands-on guide to making apps with Python by Martin Fitzpatrick(246)
Programming With Java by Edet Theophilus(245)
NextJS 13 and React Crash Course: Build a Full Stack NextJS 13 App with React, Tailwind and Prisma backend by Lim Greg(235)