Hello,
I am encountering a challenge with the REST connector when it deals with JSON data that includes empty property names. This issue arises specifically during the conversion of JSON to XML.
The REST connector fails when trying to convert JSON data that contains properties with empty names. Here is the error message I receive:
Failed to execute endpoint 'authenticate':
XmlNodeConverter cannot convert JSON with an empty property name to XML. Path 'TX_Autogenerated_Element.menu.categories.', line 1, position 94530.
This error stops the ingestion process because XML does not support tags with empty names, which are present in the JSON structure. This is the problematic part of the JSON structure:
{
"categories": {
"": {
"collapsed": false,
"description": "<No Category>",
"id": ""
},
"BUD": {
"collapsed": false,
"description": "Budget",
"id": "BUD"
}
// Additional categories
}
}
In this JSON snippet, one of the categories has an empty string as a key, which leads to the mentioned error during conversion. Not a problem in JSON, but not allowed in XML.
There is no way for us to remove the category with an empty name from the endpoint, and the endpoint is needed in order to fetch a token.
Is this something that could be fixed in a future update? Is there a workaround?
Thanks!