PHPackages                             seworqs/json-editor - 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. seworqs/json-editor

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

seworqs/json-editor
===================

A dot-notated, chainable JSON editor for PHP with built-in file support and robust array handling.

1.3.0(1y ago)0121Apache-2.0PHPPHP ^8.1

Since Apr 12Pushed 1y agoCompare

[ Source](https://github.com/seworqs/json-editor)[ Packagist](https://packagist.org/packages/seworqs/json-editor)[ RSS](/packages/seworqs-json-editor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (1)

SEworqs JSON Editor
===================

[](#seworqs-json-editor)

A dot-notated, chainable JSON editor for PHP with built-in file support and robust array handling.

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

[](#installation)

Install via Composer.

```
$> composer require seworqs/json-editor
```

Usage
-----

[](#usage)

```
use Seworqs\Json\JsonEditor;

// Create a new file.
$newJson1 = JsonEditor::createNew("/path/to/save/json/file.json");

// If you want to overwrite a file when it already exists.
$newJson2 = JsonEditor::createNew("/path/to/save/json/file.json", true);

// Create a new file.
$newJson3 = JsonEditor::createFromFile("/path/to/existing/json/file.json");

// Overwrite boolean.
$overwrite = false;

// Add key/value
$newJson3->add('some-key', 'some-value', $overwrite);

// Add key/value in levels deep using dot notation.
$newJson3->add('level1.level2.level3', 'a-deep-value', $overwrite);

// OR Add key/value in levels deep using an array.
$newJson3->add('level1', ['level2' => ['level3' => 'a-deep-level']], $overwrite);

/* Both (using dots or array) will create this:
{
...
    "level1": {
        "level2": {
            "level3": "deep-value"
        }
    },
...
}
*/
```

> [More examples](docs/Examples.md)

Features
--------

[](#features)

- Create and edit new JSON file
- Edit existing JSON file
- Use easy dot notation to get to your keys
- Add/delete single or multiple keys at once
- Bump version with seworqs/semver integration

> See our [examples](docs/Examples.md)

Classes and namespaces
----------------------

[](#classes-and-namespaces)

NamespaceClassDescriptionSeworqs\\JsonEditorJsonEditorNice JSON editorLicense
-------

[](#license)

Apache-2.0, see [LICENSE](./LICENSE)

About SEworqs
-------------

[](#about-seworqs)

Seworqs builds clean, reusable modules for PHP and Mendix developers.

Learn more at [github.com/seworqs](https://github.com/seworqs)

Badges
------

[](#badges)

[![Latest Version](https://camo.githubusercontent.com/7dc19887b6e7c32c516e5f71a9629689f88191e4e5a7330b544009a8170c8f0a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365776f7271732f6a736f6e2d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seworqs/json-editor)[![Total Downloads](https://camo.githubusercontent.com/937771869da9367415ea3cacc8db9a993b057fdb1dd888df6d22683e5bc6334d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365776f7271732f6a736f6e2d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seworqs/json-editor)[![License](https://camo.githubusercontent.com/9e59a71a99e4d98f32458c2a935dde9e409aed17def65372d7df02bb42588cc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7365776f7271732f6a736f6e2d656469746f723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seworqs/json-editor)[![PHP Version](https://camo.githubusercontent.com/754198b78f4f65372307629cca2b418dc1c52f3b14c99af280c79ad0ca45ee8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7365776f7271732f6a736f6e2d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seworqs/json-editor)[![Made by SEworqs](https://camo.githubusercontent.com/769d482c5bcf68db451a940ad062d3c696be4f34f6b13d54fc4b179309d652e4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61646525323062792d5345776f7271732d3030326437343f7374796c653d666c61742d737175617265266c6f676f3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f7365776f7271732f6a736f6e2f6d61696e2f6173736574732f6c6f676f2e737667266c6f676f436f6c6f723d7768697465)](https://github.com/seworqs)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance48

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~4 days

Total

5

Last Release

387d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a83a01e1305cbd8007675b4271d06b7d3680f4e9ddc447186632d2c05982cdd?d=identicon)[seworqs](/maintainers/seworqs)

---

Top Contributors

[![seworqs-sefranke](https://avatars.githubusercontent.com/u/205894657?v=4)](https://github.com/seworqs-sefranke "seworqs-sefranke (6 commits)")

---

Tags

array-handlingdot-notationeditorimmutablejsonjson-filejson-manipulationjson-writerphpseworqsphpjsoneditorimmutabledot notationseworqsjson fileJSON Writerjson manipulationarray handling

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/seworqs-json-editor/health.svg)

```
[![Health](https://phpackages.com/badges/seworqs-json-editor/health.svg)](https://phpackages.com/packages/seworqs-json-editor)
```

###  Alternatives

[adhocore/json-fixer

Fix/repair truncated JSON data

51543.2k2](/packages/adhocore-json-fixer)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[blancks/fast-jsonpatch-php

Class designed to efficiently handle JSON Patch operations in accordance with the RFC 6902 specification

396.4k](/packages/blancks-fast-jsonpatch-php)[josantonius/json

PHP simple library for managing Json files.

1621.6k10](/packages/josantonius-json)

PHPackages © 2026

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