Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Cloud-Native Java Development with MicroProfile

You're reading from   Practical Cloud-Native Java Development with MicroProfile Develop and deploy scalable, resilient, and reactive cloud-native applications using MicroProfile 4.1

Arrow left icon
Product type Paperback
Published in Sep 2021
Publisher Packt
ISBN-13 9781801078801
Length 404 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (5):
Arrow left icon
Alasdair Nottingham Alasdair Nottingham
Author Profile Icon Alasdair Nottingham
Alasdair Nottingham
John Alcorn John Alcorn
Author Profile Icon John Alcorn
John Alcorn
David Chan David Chan
Author Profile Icon David Chan
David Chan
Emily Jiang Emily Jiang
Author Profile Icon Emily Jiang
Emily Jiang
Andrew McCright Andrew McCright
Author Profile Icon Andrew McCright
Andrew McCright
+1 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Cloud-Native Applications
2. Chapter 1: Cloud-Native Applications FREE CHAPTER 3. Chapter 2: How Does MicroProfile Fit into Cloud-Native Application Development? 4. Chapter 3: Introducing the IBM Stock Trader Cloud-Native Application 5. Section 2: MicroProfile 4.1 Deep Dive
6. Chapter 4: Developing Cloud-Native Applications 7. Chapter 5: Enhancing Cloud-Native Applications 8. Chapter 6: Observing and Monitoring Cloud-Native Applications 9. Chapter 7: MicroProfile Ecosystem with Open Liberty, Docker, and Kubernetes 10. Section 3: End-to-End Project Using MicroProfile
11. Chapter 8: Building and Testing Your Cloud-Native Application 12. Chapter 9: Deployment and Day 2 Operations 13. Section 4: MicroProfile Standalone Specifications and the Future
14. Chapter 10: Reactive Cloud-Native Applications 15. Chapter 11: MicroProfile GraphQL 16. Chapter 12: MicroProfile LRA and the Future of MicroProfile 17. Other Books You May Enjoy

Managing the payload with JSON-P and JSON-B

While RESTful services in general and JAX-RS applications specifically can serve entities of any media type (plain text, Extensible Markup Language (XML), Portable Document Format (PDF), binary, and so on), JSON is the standard du jour for cloud-native applications. JSON is popular because it is both human-readable and easily parsed— libraries for JSON parsing and binding exist in virtually all modern languages.

In the Entity providers section, we got a taste of serializing and deserializing a Java object (Person) into JSON. In that section, we performed this by hand using string manipulation. While a manual approach can work, we're now going to discuss two APIs that enable simpler and more powerful control over JSON in Java.

JSON-P is a programmatic API for manipulating JSON, while JSON-B is a declarative (annotation-based) API for quickly and easily mapping an object to JSON or vice versa.

JSON-P

JSON-P has an object...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime