[{"data":1,"prerenderedAt":94},["ShallowReactive",2],{"tool-guide:data-converter":3},{"overview":4,"whatIs":5,"useCases":6,"steps":12,"commonMistakes":18,"relatedStandards":24,"comparison":37,"example":74,"limitations":78,"faq":81},"JSON, YAML & XML Converter transforms JSON to YAML or XML and converts YAML or XML back to readable JSON using bounded local parsers and explicit XML mapping conventions.","JSON, YAML, and XML are the three dominant data serialization formats in software engineering, each with different strengths. JSON is compact and fast to parse, making it the standard for REST APIs and web applications. YAML is human-friendly with significant whitespace, comments, and anchors, making it the preferred format for configuration files (Docker Compose, Kubernetes manifests, GitHub Actions, Ansible). XML is verbose but supports attributes, namespaces, schemas, and mixed content, remaining essential in enterprise systems (SOAP, SAML, Maven, SVG). Converting between these formats is a routine task: importing API data into configuration files, transforming configuration for different deployment targets, or migrating between systems that use different formats. This tool handles four conversion directions locally in your browser, with careful handling of the structural differences between formats — such as XML attributes (mapped as @_ prefixed keys) and text nodes (mapped as #text) that have no direct equivalent in JSON or YAML.",[7,8,9,10,11],"Kubernetes manifest authoring — convert a JSON object to YAML for use in a Kubernetes deployment or service manifest.","API documentation — convert YAML examples to JSON for inclusion in OpenAPI specifications or Postman collections.","Legacy system integration — convert XML responses from SOAP services to JSON for processing in modern JavaScript applications.","Configuration migration — convert Docker Compose YAML to JSON for tools that require JSON input, or vice versa.","Data inspection — convert XML or YAML data to JSON for easier manipulation with jq, JavaScript, or Python scripts.",[13,14,15,16,17],"Choose the conversion direction: JSON to YAML, JSON to XML, YAML to JSON, or XML to JSON.","Paste valid source content in the input editor.","Run the conversion. The tool parses the input locally and produces the target format.","Review the output, paying attention to XML attribute mappings (@_ prefix) and text node handling (#text key).","Copy the converted output for use in your project.",[19,20,21,22,23],"Expecting comments to survive conversion — JSON does not support comments. Converting YAML with comments to JSON discards them. Keep the original YAML if comments matter.","YAML indentation sensitivity — YAML uses indentation for structure. A wrong indent level changes the meaning entirely (a nested key becomes a sibling). Verify the structure after converting from JSON.","XML attribute loss — when converting XML to JSON and back, attributes may not round-trip perfectly because JSON has no concept of attributes vs elements.","YAML type coercion — YAML auto-interprets unquoted values: \"true\" becomes boolean, \"1.0\" becomes float, \"null\" becomes null. Quote values that should remain strings.","XML root element requirement — XML requires a single root element. When converting JSON with multiple top-level keys, the tool wraps them in a root element.",[25,28,31,34],{"title":26,"url":27},"RFC 8259 — JSON Data Interchange Format","https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc8259",{"title":29,"url":30},"YAML 1.2 Specification","https:\u002F\u002Fyaml.org\u002Fspec\u002F1.2.2\u002F",{"title":32,"url":33},"W3C — XML 1.0 Specification","https:\u002F\u002Fwww.w3.org\u002FTR\u002Fxml\u002F",{"title":35,"url":36},"TOML Specification","https:\u002F\u002Ftoml.io\u002Fen\u002F",{"heading":38,"columns":39,"rows":43},"JSON vs YAML vs XML",[40,41,42],"JSON","YAML","XML",[44,50,54,57,63,68],{"label":45,"values":46},"Comments",[47,48,49],"No","Yes (#)","Yes (\u003C!-- -->)",{"label":51,"values":52},"Attributes",[47,47,53],"Yes",{"label":55,"values":56},"Namespaces",[47,47,53],{"label":58,"values":59},"Human readability",[60,61,62],"Good","Excellent","Verbose",{"label":64,"values":65},"Parsing speed",[66,67,67],"Fast","Moderate",{"label":69,"values":70},"Common use",[71,72,73],"APIs, web apps","Config files, CI\u002FCD","Enterprise, documents",{"label":75,"input":76,"output":77},"Convert a deployment record","{\"service\":\"ledger\",\"replicas\":3}","service: ledger\nreplicas: 3",[79,80],"JSON-to-XML output is wrapped in one root element; attributes use @_ and mixed text uses #text.","Comments, anchors, aliases, namespace intent, and formatting trivia may not survive a cross-format round trip.",[82,85,88,91],{"question":83,"answer":84},"Which conversion directions are supported?","JSON to YAML, JSON to XML, YAML to JSON, and XML to JSON. Each direction uses a dedicated local parser.",{"question":86,"answer":87},"Are YAML comments preserved?","Comments are lost during conversion because JSON does not support comments. If comments are important, keep the original YAML source.",{"question":89,"answer":90},"How are XML attributes mapped?","Attributes are prefixed with @_ in the JSON output. Text content inside elements with attributes uses the #text key.",{"question":92,"answer":93},"Does conversion change the data?","The data values are preserved, but structural features specific to one format (comments, attributes, anchors) may not survive conversion to a format that lacks those features.",1788868140533]