# JSON Thread Dump Format

The JSON text is an object with a member named "threadDump" that is an object with the following members:

threadDump members
Name | Data type | Optional | Description
--- | --- | --- | ---
formatVersion | number | no | The format version. Its value is 2.
processId | number | no | The process identifier (pid) of the VM that generated the thread dump.
time | string | no | The timestamp, in ISO 8601 format, when the thread dump was generated.
runtimeVersion | string | no | The runtime version of the VM that generated the thread dump.
threadContainers | array | no | The array of thread "groupings". The first element is the root grouping/container with name "<root>".

Each element in the "threadContainers" array is an object that represents a grouping/container of threads with the following members:

threadContainers members
Name | Data type | Optional | Description
--- | --- | --- | ---
container | string | no | The thread container name. The name is unique.
parent | string or null | no | The thread container parent's name or `null` for the root container.
owner | number or null | no | The thread identifier of the thread that owns the thread container or `null` if no owner.
threads | array | no | The array of threads in the thread grouping/container.
threadCount | number | yes | The number of threads in the thread grouping/container. If the thread dump includes all virtual threads then this count is the same as the number of elements in the threads array. If all virtual threads are not included then it may be larger than the number of elements in the threads array.

Each element in a "threads" array is an object with the following members:

threads members
Name | Data type | Optional | Description
--- | --- | --- | ---
tid | number | no | The thread identifier.
time | string | no | The timestamp, in ISO 8601 format, when the thread was sampled.
name | string | no | The thread name.
state | string | no | The string representation of the thread state.
virtual | boolean | yes | `true` if the thread is a virtual thread.
carrier | number | yes | The thread identifier of the carrier thread when this thread is a mounted virtual thread.
stack | array | no | The thread stack. The elements in the array are of type string with the string representation of a stack trace element. If the thread stack has one or more elements, then the first element is the top of the stack.
parkBlocker | object | yes | The object responsible for the thread parking. Its members identify the blocker object, and the exclusive owner thread if owned.
blockedOn | string | yes | The identity string of the object that the thread is blocked on waiting to enter/re-enter a synchronization method or block.
waitingOn | string | yes | The identity string of the object that the thread is waiting to be notified.
monitorsOwned | array | yes | The objects for which a monitor is owned by the thread.

A "parkBlocker" object has the following members:

parkBlocker members
Name | Data type | Optional | Description
--- | --- | --- | ---
object | string | no | The identity string of the blocker object responsible for the thread parking.
owner | number | yes | The thread identifier of the exclusive owner thread when the parkBlocker is an `AbstractOwnableSynchronizer`.

Each element in a "monitorsOwned" array is an object with the following members:

monitorsOwned members
Name | Data type | Optional | Description
--- | --- | --- | ---
depth | number | no | The stack depth at which the monitors are owned.
locks | array | no | The elements of the array are of type string or null. An element of type string has a value that is the identity string of the object for which the monitor is owned by the thread. The element is of type null when the object has been eliminated.