PHPackages                             laminas/laminas-xml2json - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. laminas/laminas-xml2json

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

laminas/laminas-xml2json
========================

Provides functionality for converting XML to JSON, optionally including XML attributes

3.3.0(4y ago)14408.5k↓11.9%313BSD-3-ClausePHPPHP ^7.3 || ^8.0CI failing

Since Dec 31Pushed 7mo ago12 watchersCompare

[ Source](https://github.com/laminas/laminas-xml2json)[ Packagist](https://packagist.org/packages/laminas/laminas-xml2json)[ Docs](https://laminas.dev)[ Fund](https://funding.communitybridge.org/projects/laminas-project)[ RSS](/packages/laminas-laminas-xml2json/feed)WikiDiscussions 3.4.x Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (10)Used By (13)

laminas-xml2json
================

[](#laminas-xml2json)

> ## 🇷🇺 Русским гражданам
>
> [](#-русским-гражданам)
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> [](#-to-citizens-of-russia)
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

> This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only). If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/). If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)

[![Build Status](https://github.com/laminas/laminas-xml2json/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-xml2json/actions?query=workflow%3A%22Continuous+Integration%22)

laminas-xml2json provides functionality for converting XML structures to JSON.

Installation
------------

[](#installation)

Run the following to install this library:

```
$ composer require laminas/laminas-xml2json
```

Documentation
-------------

[](#documentation)

Browse the documentation online at

Support
-------

[](#support)

- [Issues](https://github.com/laminas/laminas-xml2json/issues/)
- [Chat](https://laminas.dev/chat/)
- [Forum](https://discourse.laminas.dev/)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance45

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~235 days

Recently: every ~425 days

Total

10

Last Release

215d ago

PHP version history (3 changes)3.0.0PHP ^5.5 || ^7.0

3.1.0PHP ^5.6 || ^7.0

3.1.x-devPHP ^7.3 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25943?v=4)[Matthew Weier O'Phinney](/maintainers/weierophinney)[@weierophinney](https://github.com/weierophinney)

---

Top Contributors

[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (31 commits)")[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (29 commits)")[![Koopzington](https://avatars.githubusercontent.com/u/3015529?v=4)](https://github.com/Koopzington "Koopzington (5 commits)")[![TavoNiievez](https://avatars.githubusercontent.com/u/64917965?v=4)](https://github.com/TavoNiievez "TavoNiievez (3 commits)")[![Xerkus](https://avatars.githubusercontent.com/u/725842?v=4)](https://github.com/Xerkus "Xerkus (2 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (2 commits)")[![PowerKiKi](https://avatars.githubusercontent.com/u/72603?v=4)](https://github.com/PowerKiKi "PowerKiKi (2 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (2 commits)")

---

Tags

hacktoberfestsecurity-updates-onlyjsonlaminasxml

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laminas-laminas-xml2json/health.svg)

```
[![Health](https://phpackages.com/badges/laminas-laminas-xml2json/health.svg)](https://phpackages.com/packages/laminas-laminas-xml2json)
```

###  Alternatives

[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[akrabat/rka-content-type-renderer

Render an array to a JSON/XML/HTML PSR-7 Response based on a PSR-7 Request's Accept header.

40443.2k1](/packages/akrabat-rka-content-type-renderer)[thunderer/serializard

Flexible serializer

2767.3k1](/packages/thunderer-serializard)[danharper/laravel-jsonx

Add XML support to a JSON-speaking Laravel API with a single middleware via JSONx

1857.2k](/packages/danharper-laravel-jsonx)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
