Hi, I have an input in XML format, that can vary its fields.
I want to transform it to JSON format, but can't specify input metadata as it is not previously known.
Is it possible with Dataweave? I have seen some solutions with Groovy, but I couldn't figure out how to add the Groovy script with the JSON library.
Thak you very much!
답변 6개
It is very possible to transform XML to JSON, Simply say payload and json format
%dw 2.0
output application/json
---
payload
Whole structure will be mapped fine.
Except attributes because JSON doe not have attributes - only values.
Hope it helps -- Creating Mulesoft apps at https://simpleflatservice.com