PHPackages                             lukaserat/webmozart-json-laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lukaserat/webmozart-json-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lukaserat/webmozart-json-laravel
================================

A webmozart/json service provider for Laravel

010PHP

Since Jun 14Pushed 10y agoCompare

[ Source](https://github.com/lukaserat/webmozart-json-laravel)[ Packagist](https://packagist.org/packages/lukaserat/webmozart-json-laravel)[ RSS](/packages/lukaserat-webmozart-json-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Webmozart JSON Laravel
======================

[](#webmozart-json-laravel)

A [webmozart/json](https://github.com/webmozart/json) wrapper for [Laravel Framework](https://github.com/laravel/laravel).

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

[](#installation)

Use \[Composer\] to install the package:

```
$ composer require lukaserat/webmozart-json-laravel

```

Laravel Users
-------------

[](#laravel-users)

I just combined the two major classes `webmozart/json` has to offer, the **Encoder** and **Decoder**, for easy usage.

Just include the service provider and that's it.

```
// app/config/app.php
'providers' => [
    '...',
    'Lukaserat\WebmozartJson\JsonServiceProvider'
];

```

*Note: Facade will be automatically registered as 'JsonHelper'*

When this provider is booted, you'll gain access on helpful functions from `webmozart/json`. See the example below:

Encoding
--------

[](#encoding)

**Instead of this...**

```
// somewhere in your application..
use Webmozart\Json\JsonEncoder;
$encoder = new JsonEncoder();

// Store JSON in string
$string = $encoder->encode($data);

// Store JSON in file
$encoder->encodeFile($data, '/path/to/file.json');

```

**You can do it this way..**

```
// Store JSON in string
$string = JsonHelper::encode($data);

// Store JSON in file
JsonHelper::encodeFile($data, '/path/to/file.json');

```

Webmozart/Json Usage
--------------------

[](#webmozartjson-usage)

This is just a wrapper for Laravel. For more details about the `webmozart/json` go to its [github page](https://github.com/webmozart/json).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a1fabcb1f2bf6fc3ab74dd7d5ba8f24ce8575241f387a92fd3be4bad5e47940?d=identicon)[lukaserat](/maintainers/lukaserat)

---

Top Contributors

[![lukaserat](https://avatars.githubusercontent.com/u/181592520?v=4)](https://github.com/lukaserat "lukaserat (6 commits)")

### Embed Badge

![Health badge](/badges/lukaserat-webmozart-json-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/lukaserat-webmozart-json-laravel/health.svg)](https://phpackages.com/packages/lukaserat-webmozart-json-laravel)
```

PHPackages © 2026

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