Skip to content
Fourohtwo

saylorinnovations.com/api/convert/xml-to-json

Convert XML to JSON with attributes as @keys, repeated elements as arrays, CDATA and entities handled, using a parser that rejects DOCTYPE and entities

SolanaAnswering
GEThttps://saylorinnovations.com/api/convert/xml-to-json

Uptime100% of 1 check in 30 days

30 days agoToday

Call it from an agent

curl -i "https://saylorinnovations.com/api/convert/xml-to-json?xml=%3Corder+id%3D%227%22%3E%3Citem+sku%3D%22a%22%3Epen%3C%2Fitem%3E%3Citem+sku%3D%22b%22%3Ebook%3C%2Fitem%3E%3Cnote%3EHi+%26amp%3B+bye%3C%2Fnote%3E%3C%2Forder%3E"

# 402 Payment Required comes back with the price and where to pay.

Example input

{
  "xml": "<order id=\"7\"><item sku=\"a\">pen</item><item sku=\"b\">book</item><note>Hi &amp; bye</note></order>"
}

More from Saylor Innovations Data Desk