Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 02-08-2024 at 15:08
Please, ANSWER this question AT https://stackoverflow.com/questions/78825662/why-am-i-receiving-a-wrong-syntax-error-when-sending-valid-json-to-an-api-in-f
Question:
Why am I receiving a "WRONG_SYNTAX" error when sending valid JSON to an API in Fiware IoT agent?
Description:
I'm encountering an issue where my JSON request, which appears to be syntactically correct, is being rejected by an API with the following error message:
`
`
Here is the JSON payload I'm sending:
` {
"devices": [
{
"device_id": "temp005",
"entity_name": "urn:ngsi-ld:Temp:005",
"entity_type": "Temp",
"timezone": "Europe/Berlin",
"attributes": [
,
{ "object_id": "e", "name": "event", "type": "Text" } ],
"static_attributes": [
]
}
]
}`
I verified that the JSON is valid using a JSON validator. the headers are also as follow :
`fiware-service = openiot
fiware-servicepath = /
Accept = application/json`
I created a services group with this payload before :
` {
"services": [
]
}`
and also provisioned a trusted service group with this payload before :
`
`
Activity
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
6d 15h 2m | 1 | Fernando Lopez | 11/Feb/25 8:45 AM | |||||
|
2s | 1 | Fernando Lopez | 11/Feb/25 8:45 AM | |||||
|
138d 21h 59m | 1 | Jason Fox | Monday 7:44 AM |