I am using Talend API tester to send a POST request to my FastAPI backend, and a PostgreSQL database. Please note that the table has a JSONB column. I get the error message;
"msg": "Expecting property name enclosed in double quotes: line 10 column 3 (char 354)".
I have ensured that all property names are enclosed in double quotes but i still get the error, what am i doing wrong?
Here is the request body from Talend, with the last curly brace being on line 10 in Talend;
{
"site_id": "dd63d665-1a90-41a6-baad-fa6df7ff99f3",
"notion_link": "https://excited-fuel-931.notion.site/Q-A-by-Uwem-Uke-ef70156ea56f47408aa9f1de0a3162cc",
"sync_data": {
"title": "Q/A by Uwem Uke",
"description": "Amazing website",
"is_rtl": "true",
"social_media_link": "https://twitter.com/uwemuke",
"appearance": "light",
}
}
The error was caused by the trailing coma in the last property:
"appearance": "light",
That made the API client expect an additional property which apparently wasn't enclosed in double quotes. Solved it by removing the trailing coma.
{
"site_id": "dd63d665-1a90-41a6-baad-fa6df7ff99f3",
"notion_link": "https://excited-fuel-931.notion.site/Q-A-by-Uwem-Uke-ef70156ea56f47408aa9f1de0a3162cc",
"sync_data": {
"title": "Q/A by Uwem Uke",
"description": "Amazing website",
"is_rtl": "true",
"social_media_link": "https://twitter.com/uwemuke",
"appearance": "light"
}
}