Email the Author
You can use this page to email Norman Peitek about Gson: Enjoy JSON (De-)Serialization in Java.
About the Book
Learn Every Detail About Gson
Every modern Java application will need to do some Java-JSON parsing in their application life cycle. Gson is the most commonly used library to do the Java-JSON serialization and deserialization automatically.
Data parsing and mapping is complex. Even though Gson makes things quite simple, there are a lot of details that can trip your development up. If it's crazy data structures, weird variable names or complex dynamic data, you can lose a lot of time on something that should be done in minutes. Gson solves most problems in just a few lines. You just need to know the solutions!
This book includes an extensive introduction to Gson's features. We recommend to read it before you even have to use Gson for the first time. But even if you're already an avid user of Gson and stuck at a problem, we're confident we'll solve your problem.
Use our extensive bundle to learn about:
- Introduction to JSON & JSON-Java mapping
- Quick start to jump right into Gson
- Mapping of any Java type
- Deep dive into Gson's configuration options
- Practical examples of Gson customization
- Even advanced topics (Streaming, Generics, ...) are covered
- Necessary ProGuard configuration for Android app releases
Additionally, you'll get an extensive appendix:
- Combining a customized Gson with Retrofit 2
- Overview over common mistakes
- Exploration of Gson alternatives
Who Is This Book For?
This book is for Android or Java developers who want to get a substantial overview and reference book for Gson. You’ll benefit from the clearly recognizable code examples in regard to your daily work with Gson.
Rookie
If you’re just starting out with Gson (or coming from any other Java-JSON library like Jackson databind) this book will show you all important parts on how to work with Gson. The provided code snippets let you jumpstart and create the first mapping within minutes.
Expert
You already worked with Gson before? You’ll profit from our extensive code snippets and can improve your existing code base. Additionally, the book illustrates various optimizations for an even better performance.
Code Samples
Every code snippet in the book has been tested. We provide our test project as a leanpub extra. Feel free to download it and check the full code base as you move through the book. We try to keep the code snippets in the book as short as possible. If more context is necessary, the code examples should provide it.
Workbook
For the first time, we provide additional separated resources besides our book. The workbook gives you a chance to implement everything you'll learn in this book yourself. In our experience actually using a library like Gson helps to reinforce the newly gained knowledge. Thus, we've designed the workbook, which gives you a guided playground to experiment and learn the features of Gson.
About the Author
Norman is passionate Android developer since 2011. He's developed multiple apps, which have been used by millions of users overall. Building high-quality products is always Norman's #1 focus. While working as an Android freelancer and consultant is his day job, he loves teaching and passing on knowledge on the side.
Since 2014, Norman started working on the API side as well. Developing node.js apps is a good alternative and provides some good insight into becoming a better programmer overall.
Norman has a Master's degree from the Otto von Guericke University Magdeburg.