Skip to main content
Nahuel Tori (PMI) 님이 #MuleSoft DataWeave에 질문했습니다

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개
  1. 2020년 8월 25일 오후 10:45

    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

0/9000