Originally posted by: MarieWallace
I've been working with ITX for a few months processing a variety of input formats (EDI,CSV, ...) and transforming into output JSON. During this time I've run into issues with invalid JSON being generated by ITX, and the worst part of this is that it doesn't tell you it had an issue so you don't know that the map failed until the consuming application validates the output JSON and identifies that it's invalid. Are these known issues/bugs, and/or is there a workaround or different approach I should take in mapping to JSON?
-
Input data with special characters results in invalid JSON.
I can in theory workaround this issue by "Using item restrictions to escape special characters" (thanks to PaulBrett), but it's hugely time consuming to add checks into every single field in my input and to keep track of all the types of character combinations that invalidate JSON. Is there a better way of ensuring ITX generates valid JSON?
-
Input data with empty fields, where ITX doesn't properly close the output JSON. This specifically happens if I have embedded objects, specifically if you've an array which frequently doesn't get properly closed. For example;
"organizations" : [
{
"profile" : {
"id" : 1457329351,
"name" : {
"firstname" : "John",
"lastname" : "Doe"
}
}
}
]
This is a really horrible problem as it's really hard to find. I've tried to use PRESENT(...) conditionals all over my maps and to put "dummy - always there" objects into the output JSON which I can use to force array to close.
Has anyone else run into either of these issues? Are there fixes or other ways of addressing these issues?
#DataExchange#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender