Skip to content

v1.0.0 — First public release

Choose a tag to compare

@A35G A35G released this 10 Sep 21:13
· 23 commits to main since this release

Description

First public release of json-to-xml, a PHP library for converting
JSON to XML and back, with support for attributes, automatic CDATA,
and mixed content.

Key Features

  • JSON → XML conversion (JsonToXmlConverter)
  • XML → JSON conversion (XmlToJsonConverter)
  • Attributes via the @ prefix
  • Direct text / mixed content via the #text key
  • Repeated lists without an intermediate wrapper
  • Automatic CDATA based on content
  • Protection against XXE attacks (LIBXML_NONET)
  • forceArrayTags to preserve the "list" shape in the XML → JSON round-trip

Requirements

  • PHP >= 8.1
  • dom and json extensions

Installation

composer require a35g/json-to-xml

Documentation

Full user guide available in the Wiki.