Minecraft Wiki

The Minecraft Wiki has moved from Fandom; see the linked discussion page for details.

READ MORE

Minecraft Wiki
Advertisement

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

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

Syntax

A JSON file must always contain opening and closing curly brackets which encapsulate all of the files data.

{
    "string": "Hi",
    "number": 1,
    "object": {"stuff": "foobar", "digit": 13},
    "array": ["spam", "foo"]
}

All element names in a JSON file must be contained inside quotes. To define a value, a colon is used after the name, followed by a value.

{
    "name": "value"
}

All elements except for the last element in an array or object should have a comma after their value.

Data types

There are 5 different data types in regular JSON: string, number, object, array, and boolean.

String

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

{
    "foo": "bar",
    "spam": "eggs"
}

Number

A number is defined by entering in any number.

{
    "two": 2,
    "one": 1,
    "second": 1
}

Object

An object is defined by opening and closing curly brackets and can contain any combination of any data types. The required curly brackets at the beginning and end of a file make an object.

{
    "Bob": {
        "ID": 47182,
        "lastName": "Ramsay"
    },
    "Alice": {
        "ID": 47183,
        "lastName": "Berg"
    }
}

Array

Arrays are defined by opening and closing square brackets and can, again, contain any data types.

{
    "people": ["Bob", "Alice", "Carlos", "Eve"]
}

Boolean

A boolean is very simple; it can be true or false.

{
    "Alice": {
        "isMale": false
    },
    "Bob": {
        "isMale": true
    }
}
Disambig color This disambiguation page lists articles associated with the same title. If an internal link led you here, you may wish to change the link to point directly to the intended article.
Advertisement