gmcr.cz
(GM group & Co, s.r.o.)
September 21, 2023, 11:00am
1
When I setup API data page in a way that it omits ROOT element, I get a result where all attribute names have @ as a first character, e.g. “@AttributeName1 ”.
Resulting JSON is in my eyes not clean. I would like to omit the @ character.
Any idea how to do it?
tvavrda
(Tomáš Vavrda)
September 22, 2023, 8:44am
2
Does it mean if you just turn the option to omit Root element off you get attributes without @
?
gmcr.cz
(GM group & Co, s.r.o.)
September 22, 2023, 10:03am
3
Nope. It means I setup OmitJsonRootElement to true and fill in Transformation so that everything is copied 1:1 and then the root element is omitted.
But all attributes have @ as a first character anyway.
My solution to that was to switch XMLMappingType for every field in api DataStructure to Element . Than all @ characters disappeared.
tvavrda
(Tomáš Vavrda)
September 22, 2023, 10:07am
4
Can you please make a screenshot of your API model element so it is clear what combination are you using?
gmcr.cz
(GM group & Co, s.r.o.)
September 22, 2023, 10:12am
5
This setting causes ROOT element to be omitted from JSON result.
system
(system)
Closed
September 24, 2023, 10:13am
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.