This page describes Spine's JSON export format for skeleton and animation data. Runtimes load this data to display animations. Also, Spine can import data in this format, allowing interoperability with other tools.

The Spine Runtimes handle loading JSON and binary data. You do not need to write your own loading code unless you are writing your own runtime from scratch (which is an enormous amount of work).

The JSON format is human readable and editable, especially when used with the "pretty print" setting. This makes it a good choice when needing to manually inspect or otherwise process the data. It is also resistant to minor changes in the runtimes, which may prevent the need to re-export the data when the runtime changes. The downside is that the JSON format has a larger file size than the binary format and is slower to load at runtime.

Data marked "nonessential" is only output when the Nonessential data export setting is checked. This data is not required for rendering but may be useful for tools or when importing the data back into Spine.

The JSON format is the serialized version of a "skeleton data" instance, which has a list of bones, slots, skins, and animations. This is stateless data that is not tied to a particular on-screen skeleton instance. Example JSON

The "slots" section may be omitted if there are no slots. Slots are ordered in the setup pose draw order. Images in higher index slots are drawn on top of those in lower index slots.

Slot attributes:

name: The slot name. This is unique for the skeleton.

bone: The name of the bone that this slot is attached to.

color: The color of the slot for the setup pose. This is an 8 character string containing 4 two digit hex numbers in RGBA order. Assume "FF" for alpha if alpha is omitted. Assume "FFFFFFFF" if omitted.

dark: The dark color of the slot for the setup pose, used for two color tinting. This is a 6 character string containing 3 two digit hex numbers in RGB order. Omitted when two color tinting is not used.

attachment: The name of the slot's attachment for the setup pose. Assume no attachment for the setup pose if omitted.

blend: The type of blending to use when drawing the slot's visible attachment: normal, additive, multiply, or screen.

The "transform" section may be omitted if there are no transform constraints.

Transform constraint attributes:

name: The constraint name. This is unique for the skeleton.

order: The ordinal for the order constraints are applied.

bone: The bone whose transform will be controlled by the constraint.

target: The name of the target bone.

rotation: The rotation to offset from the target bone. Assume 0 if omitted.

x: The X distance to offset from the target bone. Assume 0 if omitted.

y: The Y distance to offset from the target bone. Assume 0 if omitted.

scaleX: The X scale to offset from the target bone. Assume 0 if omitted.

scaleY: The Y scale to offset from the target bone. Assume 0 if omitted.

shearX: The X shear to offset from the target bone. Assume 0 if omitted.

shearY: The Y shear to offset from the target bone. Assume 0 if omitted.

y: The Y distance to offset from the target bone. Assume 0 if omitted.

rotateMix: A value from 0 to 1 indicating the influence the constraint has on the bones, where 0 means no affect, 1 means only the constraint, and between is a mix of the normal pose and the constraint. Assume 1 if omitted.

translateMix: See rotateMix.

scaleMix: See rotateMix.

shearMix: See rotateMix.

local: True if the target's local transform is affected, else the world transform is affected. Assume false if omitted.

relative: True if the target's transform is adjusted relatively, else the transform is set absolutely. Assume false if omitted.

rotation: The rotation to offset from the path rotation. Assume 0 if omitted.

position: The path position. Assume 0 if omitted.

spacing: The spacing between bones. Assume 0 if omitted.

spacing: The spacing between bones. Assume 0 if omitted.

rotateMix: A value from 0 to 1 indicating the influence the constraint has on the bones, where 0 means no affect, 1 means only the constraint, and between is a mix of the normal pose and the constraint. Assume 1 if omitted.

The "skins" section may be omitted if there are no skins or attachments.

Each skin is essentially a map with a compound key consisting of a slot and attachment name and the value is an attachment. The attachment name used in the key is the same for each skin, but the actual attachment name for the attachment may vary.

For example, the "pelvis" image for the "pelvis" slot might have an actual attachment name of "red/pelvis" for the "red" skin and "blue/pelvis" for the "blue" skin. If a skeleton has the "blue" skin active and is told to show the "pelvis" image for the "pelvis" slot, the attachment it finds would have an actual attachment name of "blue/pelvis".

When a skeleton needs to find an attachment for a slot, it first checks its skin. If not found, the skeleton then checks its default skin. The default skin contains attachments that are not defined by a skin in Spine, allowing mixed usage of skin and non-skin attachments. The default skin always has the name "default".

name: The attachment name. This is unique for the skeleton. For image attachments this is a key used to look up the texture region, for example on disk or in a texture atlas. If omitted, the key from the surrounding JSON map is used as the actual attachment name.

Attachment type:

region: A textured rectangle.

mesh: A textured mesh whose vertices may be influenced by multiple bones using weights.

linkedmesh: A mesh which shares the UVs, vertices, and weights of another mesh.

boundingbox: A polygon used for hit detection, physics, etc.

path: A cubic spline, often used for moving bones along a path.

point: A single point and a rotation, often used for spawning projectiles or particles.

clipping: A polygon used to clip drawing of other attachments.

region attachment attributes:

path: If set, this value is used instead of the attachment name to look up the texture region.

x: The X position of the image relative to the slot's bone. Assume 0 if omitted.

y: The Y position of the image relative to the slot's bone. Assume 0 if omitted.

scaleX: The X scale of the image. Assume 1 if omitted.

scaleY: The Y scale of the image. Assume 1 if omitted.

rotation: The rotation in degrees of the image relative to the slot's bone. Assume 0 if omitted.

width: The width of the image.

height: The height of the image.

color: The color to tint the attachment. Assume FFFFFFFF RGBA if omitted.

mesh attachment attributes:

path: If set, this value is used instead of the attachment name to look up the texture region.

uvs: A list of number pairs that are the texture coordinates for each vertex.

triangles: A list of vertex indices that define each triangle for the mesh.

vertices: For each vertex either an x,y pair or, for a weighted mesh, first the number of bones which influence the vertex, then for that many bones: bone index, bind position X, bind position Y, weight. A mesh is weighted if the number of vertices > number of UVs.

hull: The number of vertices that make up the polygon hull. The hull vertices are always first in the vertices list.

edges: A list of vertex index pairs that define the edges between connected vertices. Nonessential.

color: The color to tint the attachment. Assume FFFFFFFF RGBA if omitted.

width: The width of the image used by the mesh. Nonessential.

height: The height of the image used by the mesh. Nonessential.

linkedmesh attachment attributes:

skin: The skin that contains the source mesh. If omitted, the source mesh is in the default skin.

parent: The name of the source mesh, which is always in the same slot as this mesh. If the source mesh is not in the default skin, this name is used to look up the actual attachment in the skin.

deform: If false, deform timelines for the source mesh are not applied to this mesh. Assume true if omitted.

color: The color to tint the attachment. Assume FFFFFFFF RGBA if omitted.

width: The width of the image used by the mesh. Nonessential.

height: The height of the image used by the mesh. Nonessential.

boundingbox attachment attributes:

vertexCount: The number of bounding box vertices.

vertices: For each vertex either an x,y pair or, for a weighted bounding box, first the number of bones which influence the vertex, then for that many bones: bone index, bind position X, bind position Y, weight. A bounding box is weighted if the number of vertices > vertex count.

color: The color of the bounding box in Spine. Assume 60F000FF RGBA if omitted. Nonessential.

path attachment attributes:

closed: True if the last and first vertex are connected. Assume false if omitted.

lengths: The length in the setup pose from the start of the path to the end of each curve.

vertexCount: The number of path vertices.

vertices: For each vertex either an x,y pair or, for a weighted path, first the number of bones which influence the vertex, then for that many bones: bone index, bind position X, bind position Y, weight. A path is weighted if the number of vertices > vertex count.

color: The color of the path in Spine. Assume FF7F00FF RGBA if omitted. Nonessential.

point attachment attributes:

x: The X position of the point relative to the slot's bone. Assume 0 if omitted.

y: The Y position of the point relative to the slot's bone. Assume 0 if omitted.

rotation: The rotation in degrees of the point relative to the slot's bone. Assume 0 if omitted.

color: The color of the point in Spine. Assume F1F100FF RGBA if omitted. Nonessential.

clipping attachment attributes:

end: The name of the slot where clipping stops.

vertexCount: The number of clipping polygon vertices.

vertices: For each vertex either an x,y pair or, for a weighted clipping polygon, first the number of bones which influence the vertex, then for that many bones: bone index, bind position X, bind position Y, weight. A clipping polygon is weighted if the number of vertices > vertex count.

color: The color of the clipping attachment in Spine. Assume CE3A3AFF RGBA if omitted. Nonessential.

curve: The interpolation to use between this and the next keyframe. One of: linear, stepped, or an array defining a Bézier curve. Assume "linear" if omitted.The Bézier curve array has 4 elements which define the control points: cx1, cy1, cx2, cy2. The X axis is from 0 to 1 and represents the percent of time between the two keyframes. The Y axis is from 0 to 1 and represents the percent of the difference between the keyframe's values.

rotate keyframe attributes:

angle: The bone's rotation relative to the setup pose. Assume 0 if omitted.

translate keyframe attributes:

x: The bone's X position relative to the setup pose. Assume 0 if omitted.

y: The bone's Y position relative to the setup pose. Assume 0 if omitted.

color: The color to set for the slot. This is an 8 character string containing 4 two digit hex numbers in RGBA order.

curve: The interpolation to use between this and the next keyframe. One of: linear, stepped, or an array defining a Bézier curve. Assume "linear" if omitted.The Bézier curve array has 4 elements which define the control points: cx1, cy1, cx2, cy2. The X axis is from 0 to 1 and represents the percent of time between the two keyframes. The Y axis is from 0 to 1 and represents the percent of the difference between the keyframe's values.

offset: The number of vertices to skip before applying vertices. Assume vertices <= offset are 0.

vertices: A list of number pairs that are the amounts to add to the setup vertex positions for the keyframe. If there are fewer entries than vertices, assume vertices after these are 0.

curve: The interpolation to use between this and the next keyframe. One of: linear, stepped, or an array defining a Bézier curve. Assume "linear" if omitted.The Bézier curve array has 4 elements which define the control points: cx1, cy1, cx2, cy2. The X axis is from 0 to 1 and represents the percent of time between the two keyframes. The Y axis is from 0 to 1 and represents the percent of the difference between the keyframe's values.

offsets: A list of slot names and numeric offsets, which are the number of draw order entries to shift the specified slot relative to its setup pose draw order index. If "offsets" is omitted, the keyframe will set the draw order to the setup pose draw order.