Book Image

RESTful Java Web Services, Second Edition

Book Image

RESTful Java Web Services, Second Edition

Overview of this book

Table of Contents (17 chapters)
RESTful Java Web Services Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

A brief overview of JSON


JSON is a lightweight, text-based, platform neutral, data interchange format in which objects are represented in the attribute-value pair format. Historically, JSON originated from JavaScript. However, nowadays, it is considered to be a language-independent format because of its wide adoption by all modern programming languages. In this section, you will learn the basics of the JSON format. You will also learn how to represent real-life business data in the JSON format.

Understanding the JSON data syntax

The JSON format is very simple by design. It is represented by the following two data structures:

  • An unordered collection of name-value pairs (representing an object): The attributes of an object and their values are represented in the name-value pair format; the name and the value in a pair is separated by a colon (:). Names in an object are strings, and values may be of any of the valid JSON data types such as number, string, Boolean, array, object, or null. Each...