IDoc to JSON
Turn an SAP IDoc into JSON — the shape you map from.
Your data never leaves your browser
This tool runs entirely on your computer. What you paste or drop is never uploaded, never stored and never seen by us — close the tab and it's gone. How we know
Sign up to run — no credit card required.
Press Run to see the output. Sign up takes ten seconds — no credit card required.
Worked example
<ORDERS05><IDOC><EDI_DC40><IDOCTYP>ORDERS05</IDOCTYP><MESTYP>ORDERS</MESTYP><DIRECT>2</DIRECT></EDI_DC40></IDOC></ORDERS05>{
"@_basicType": "ORDERS05",
"@_idocType": "ORDERS05",
"@_messageType": "ORDERS",
"@_direction": "Inbound",
"Control": {
"DocNumber": "",
"Sender": {
"Partner": "",
"PartnerType": "",
"Port": ""
},
"Receiver": {
"Partner": "",
"PartnerType": "",
"Port": ""
},
"Reference": ""
},
"Header": {
"Currency": "",
"PaymentTerms": ""
},
"Partners": {
"Partner": []
},
"LineItems": {
"LineItem": []
},
"Dates": {
"Date": []
},
"References": {
"Reference": []
}
}This example is one of IDoc to JSON's test cases — if the tool stopped producing this output, the build would fail.
Questions
- Why isn't there an IDoc Viewer JSON export already?
- There is now — this is it. The IDoc Viewer reads for a human; this reads for a mapping script or a diff tool, same parse underneath.
- Does it handle any IDoc basic type, or just ORDERS05?
- Any IDoc XML the parser reads: the control record, partners, dates, references, line items with pricing conditions, and the segment histogram, whatever the basic type. Fields that aren't present come back empty rather than omitted, so the shape is stable across IDoc types.
Related tools
JSON Formattertakes json
Pretty-print and indent JSON — in your browser, nothing uploaded.
JSON Validatortakes json
Check whether JSON is valid and see the first error.
JSON to CSVtakes json
Turn a JSON array of records into CSV, with proper escaping.
JSON Minifiertakes json
Strip whitespace from JSON down to the smallest valid form.