
JavaScript and JSON Essentials
By :

JavaScript and JSON Essentials is a one-stop resource that can be used for understanding and implementing JSON in various web applications. This book provides a comprehensive insight into how JSON can be implemented and integrated into your applications. Though JSON is one of the most popular data-exchange formats, the number of books available describing JSON and helping readers build a live solution is not high. This book is a comprehensive guide to JSON that begins with JavaScript basics, discusses the history of JSON, and then takes a step-by-step approach towards using JSON to build a live web application that is powered by JSON data.
Chapter 1, JavaScript Basics, is a basic refresher for common JavaScript concepts.
Chapter 2, Getting Started with JSON, introduces the audience to JSON, discusses the history of JSON, outlines the popular programming languages that support JSON, fires a Hello World program in JSON, and writes basic programs with different data types in JSON.
Chapter 3, Working with Real-time JSON, introduces the audience to complex JSON. The JSON used in this chapter will consist of multiple datatypes and multiple objects and will be multidimensional.
Chapter 4, AJAX Calls with JSON Data, goes over the requirements to successfully pass JSON over HTTP as JSON data has to transported over HTTP in real-world scenarios.
Chapter 5, Cross-domain Asynchronous Requests, introduces the audience to the concept of making asynchronous calls across domains. Since data is being transported across domains, users will be introduced to the concept of JSON with Padding.
Chapter 6, Building the Carousel Application, discusses the idea of a Carousel application and the required setup and dependencies such as, jQuery library, and jQuery Cycle plugin for the application.
Chapter 7, Alternate Implementations of JSON, discusses the non web-development implementation of JSON such as dependency managers, metadata stores, and configuration stores. The discussion would go forward and talk about the advantages of JSON over XML and YAML.
Chapter 8, Debugging JSON, introduces the powerful tools that are available to debug, validate, and format JSON. As the number of objects increases, the length of JSON increases too, which makes it difficult for the naked eye to validate JSON.
JSON is language-and platform-independent, so readers can use an operating system of their choice. To serve live JSON, we need a live web server. There are parsers available for most of the popular server-side languages; readers can use a web server such as Apache, Tomcat, IIS, or any other web server and can pick a text editor of their choice.
This book has been designed to cater to the needs of developers at all levels. This book contains numerous working examples, tips, and notes that will guide users through all the chapters. It is not required but would be good to have some knowledge about HTML and JavaScript. Some familiarity with server-side languages such as PHP, C#, or Python would be preferred, but not required.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code and the output being generated by the code are added to the book as screenshots. The name of the file will be shown as follows:.
json_helloworld.html
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: “Load the file in a web browser, and a pop-up box with the text Hello World! should be loaded on the page”.
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.
Change the font size
Change margin width
Change background colour