Skip to content

Checklist and Further Reading

A35G edited this page Sep 10, 2026 · 1 revision

Checklist and Further Reading

Quick-start checklist

  1. Install with composer require a35g/json-to-xml.
  2. Decide on rootName (and itemNodeName if you expect lists of plain scalars). See Basic-Usage.
  3. Use @key for attributes and #text for mixed content. See Conventions.
  4. If you also convert in reverse (XML → JSON) and some tags must always stay lists, set forceArrayTags. See Round-Trip-and-Limitations.
  5. Wrap conversions in try/catch if the incoming data isn't generated by your own application. See Security-and-Error-Handling.
  6. If you generate many HTTP responses, use jsonToXmlStdOut() and set setTempDir() if the system temp directory isn't writable.

Where to go deeper

  • The project's README.md: full table of conventions and additional examples.
  • Automated tests (JsonToXmlConverterTest.php, XmlToJsonConverterTest.php, LibraryIntegrityTest.php): a useful reference for edge-case behavior (empty lists, non-sequential numeric keys, boolean values, etc.).

⬅️ Previous page: Security-and-Error-Handling · 🏠 Back to: Home

Clone this wiki locally