JSON stands for JavaScript Object Notation. Contrary to what the name suggests, it is not limited to JavaScript. It is language-independent. Parsers and serializers for JSON exist in most programming languages. JSON is much more compact than XML.
Its syntax is derived from JavaScript as it was based on a JavaScript subset.
Supported data types for JSON are the following:
- Number: The exact format may vary between implementations; defaults to the double-precision floating-point in JavaScript.
- String: Unicode-encoded.
- Boolean: Using true and false values.
- Array: May be empty.
- Object: A map with key-value pairs.
- null: Representing an empty value.
The Packer configuration presented in Chapter 9, Continuous Integration/Continuous Deployment, is an example of a JSON document:
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs"...