Document JSON

When you export a Document Project, the download folder contains JSON files of your annotations. Each document has its own JSON file.

The JSON for annotations in Documents Projects contains 4 main fields:

{
    "metadata": {},
    "instances": [],
    "tags": [],
    "freeText": ""
}

Metadata

{
    "name": "example1.txt",
    "url": "string",
    "status": "Completed",
    "projectId": 3457,
    "annotatorEmail": null,
    "qaEmail": "[email protected]",
    "lastAction": {
      "email": "[email protected]",
      "timestamp": 1631194162947
    }
 }

Description:

  • "name": “string” - Document name as stated in the CSV file or generated by SDK.
  • “url”: “string” - The URL from the attached CSV.
  • "status": “string” - The document status. It can be: NotStarted, InProgress, QualityCheck, Returned, Skipped, or Completed.
  • “projectId”: "integer" - The project ID.
  • "annotatorEmail": “string” - The assigned annotator’s email address.
  • "qaEmail": “string” - The assigned QA’s email address.
  • "lastAction": objects - The user who last made changes to an instance.
    • "email": “string” - The email address of the last user who made the changes.
    • "timestamp": "integer" - The date and time when the last change was made. Format example: "timestamp": “1626152220563”

Instances

[
    {
      "classId": 1,
      "className": "Spam",
      "start": 562,
      "end": 634,
      "attributes": [
        {
          "id": 655171,
          "groupId": 163392,
          "name": "first",
          "groupName": "Type"
        }
      ],
      "creationType": "Manual",
      "createdAt": "2021-07-29T12:15:08.216Z",
      "createdBy": {
        "email": "[email protected]",
        "role": "Annotator"
      },
      "updatedAt": "2021-07-29T12:15:09.414Z",
      "updatedBy": {
        "email": "[email protected]",
        "role": "Admin"
      }
    }
]

Description:

  • “classId”: integer - Class ID (one of the class IDs in “classes.json”)
  • “className”: string - Class name (one of the class names in “classes.json”).
  • “start”: number - The index of the instance’s first character. The index of the first character is 0.
  • “end”: number - The index of the instance’s last character.
  • “attributes”: array of objects - List of attributes for the instance.
    • “id”: "integer" - Attribute ID (must be in “classes.json”)
    • “groupId”: integer - Attribute group ID (must be in “classes.json”)
    • "name": string - Attribute name
    • "groupName": string - Attribute group name
  • “creationType”: string - The way in which the instance was created. Currently, only manual is the available option.
  • "createdBy": objects
    • "email": string - The email address of the user who created the instance.
    • "role": string - The role of the user who created the instance.
  • "createdAt": string - The date and time when the instance was created.
  • "updatedBy": objects
    • "email": string - The email address of the user who updated the instance.
    • "role": string - The role of the user who updated the instance.
  • "updatedAt": string - The date and time when the instance was updated.

Tags

[
        "Spam",
        "Non-Spam"
]

Description:

  • "Tag": string - The names of the tags that are added to the document.

Free text

"freeText": "the document describes residency"

Description:

  • "freeText": string - The text entered in the Free Text section in the editor.

Did this page help you?