Book Image

Java 9 Programming By Example

By : Peter Verhas
Book Image

Java 9 Programming By Example

By: Peter Verhas

Overview of this book

This book gets you started with essential software development easily and quickly, guiding you through Java’s different facets. By adopting this approach, you can bridge the gap between learning and doing immediately. You will learn the new features of Java 9 quickly and experience a simple and powerful approach to software development. You will be able to use the Java runtime tools, understand the Java environment, and create Java programs. We then cover more simple examples to build your foundation before diving to some complex data structure problems that will solidify your Java 9 skills. With a special focus on modularity and HTTP 2.0, this book will guide you to get employed as a top notch Java developer. By the end of the book, you will have a firm foundation to continue your journey towards becoming a professional Java developer.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

JSON


JSON stands for JavaScript Object Notation. It is defined on the site, http://www.json.org/. This is a textual notation in the same way as the object literals are defined in JavaScript . An object representation starts with the { character and ends with the } character. The text in between defines the fields of the objects in the form, string : value. The string is the name of the field, and since JSON wants to be language agnostic, it allows any characters to be a part of the name of a field, and thus this string (as well as any string in JSON) should start and end with the " characters.

Note

This may seem strange and, many times, when you start working with JSON, it is easy to forget and write { myObject : "has a string" } instead of the correct { "myObject" : "has a string" } notation.

Commas separate the fields. You can also have arrays in JSON. They start and end with [ and ] characters, respectively, and they contain comma-separated values. The value in an object field or in an array...