Error using Trakt JSON Importer: expected object key, got: '

I am unable to import successfully so far. I am using Trakt JSON format. I am using the example in the Guidelines in the import page.

Input file:

[
  {
    "imdb_id": "tt0068646",
    "watched_at": "2024-10-25T20:00:00Z",
    "watchlisted_at": "2024-10-01T10:00:00Z",
  },
  {
    "imdb_id": "tt15239678",
    "watchlisted_at": "2024-04-30T11:00:00Z",
    "rating": 9,
    "rated_at": "2024-10-25T21:00:00Z",
  },
  {
    "imdb_id": "tt4281724",
    "watched_at": "2024-01-12T02:00:00Z",
  }
]

The error is here:

error (expected object key, got: '},
  {
    "imdb_id": "tt1523967')

I see "tt1523967’ in the error. Double quote at the beginning and the single quote at the end. That does not match the input file, which has “tt15239678”. I thought maybe it was having trouble with a 8 digit ID, so I changed that entry to “tt1461238”. It did not fix anything.

Here is the error with that change:

error (expected object key, got: '},
  {
    "imdb_id": "tt1461238')

Here is a simpler input file and error.

[
  {
    "imdb_id": "tt1801552",
    "rating": 6,
    "rated_at": "2024-10-25T21:00:00Z",
  }
]
error (expected object key, got: '}
]')

Please send an email to support@trakt.tv including the file you’re trying to import and someone can take a closer look.

1 Like

I emailed it to support. Thanks.

1 Like

Your JSON is invalid because of the last comma before “}” :slight_smile:

Should be

[
{
“imdb_id”: “tt1801552”,
“rating”: 6,
“rated_at”: “2024-10-25T21:00:00Z”
}
]

1 Like

being a noob that would make sense, in grammar you don’t end a list with a comma either.

Smart :slight_smile:

Thank you. I recommend fixing the Guidelines for JSON at
–trakt.tv/welcome/7 Import