JSON

JSON (JavaScript Object Notation) is a lightweight data-interchange format.

In Minecraft, JSON format is used to store the following data:


 * Text in written books, signs, custom names and the, , , and  commands.
 * The  file that describes a Java Edition resource pack and data pack.
 * The  file that describes a Bedrock Edition add-on.
 * Files in a resource pack that define models, sound events, and UI.
 * Files in a behavior pack that define entity behaviors.
 * Advancements and statistics (as )
 * The profile data for the launcher (as )
 * Information about downloaded versions (as )
 * Files in a data pack that define advancements, loot tables, tags, dimensions, dimension types and predicates.

Data types
A JSON file must contain a single JSON value, which can use any of the following five data types: string, number, object, array, and boolean. JSON files can be contained in a single line, however it is often useful to use indentation and line breaks to make a long JSON file more readable.

String
A string is delimited by quotes and can contain any combination of characters or spaces. Some special characters need to escape.

Number
A number is defined by entering in any number. Numbers can be non-whole, as indicated with a period, and can use exponents with.

Object
An object, also referred to as a compound, is delimited by opening and closing curly brackets and contains key/value pairs. Pairs are separated with commas, keys and associated values are separated with colons. Each contained key needs to have a name that is unique within the object. A value can be of any data type as well (including another object).

Array
Arrays are delimited by opening and closing square brackets and can contain values of any data type, separated by commas. Unlike lists in NBT, values in a JSON array can use different data types.

Boolean
A boolean can be either  or.