0

Coming from this question: Conversion of XML Schema to JSON array list in Biztalk

We have the same situation: Our XML needs to be converted to JSON and we have child objects which can occur one or multiple times which must always result in a JSON array.

The problem is that we are not able to set a target namespace because our schema is generated by SAP (IDoc).

Are there other options to do the serialization? I would like to avoid a custom implementation for JSON serialization.

Chris
  • 495
  • 5
  • 18
  • 1
    Are you receiving a SAP message and trying to send it as JSON to another system? Can you create an schema based on the SAP one but where you add a namespace and then map the SAP message to that? – Dijkgraaf Jun 17 '21 at 21:11
  • Yes I've solved it this way. I've created a second schema including a target namespace and mapped the SAP message to it. The only "disadvantage" here is that I have another schema and map to maintain. Thanks for your inspiration. – Chris Jun 21 '21 at 11:48

1 Answers1

1

Create an internal BizTalk schema with a target namespace and map the SAP payload to that.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54