PHPackages                             daavelar/faker-json - 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. daavelar/faker-json

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

daavelar/faker-json
===================

2.0.6(2y ago)113PHP

Since Jun 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/daavelar/faker-json)[ Packagist](https://packagist.org/packages/daavelar/faker-json)[ RSS](/packages/daavelar-faker-json/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (3)Versions (16)Used By (0)

Faker Json
==========

[](#faker-json)

Faker Json is a library in PHP that uses the Faker library to generate valid JSONs from templates with variables. The idea is to replace variables in the format `${variable}` or `method(arguments)` with values generated by the Faker library.

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

[](#installation)

```
composer require daavelar/faker-json
```

Usage
-----

[](#usage)

```
use Faker\Factory;
use FakerJson\FakerJson;

$fakerJson = new FakerJson($faker);

$template = '{
    "name": "firstName",
    "email": "email",
    "phone": "phoneNumber",
    "age": "numberBetween(18, 65)"
    "company": {
        "name": "companyName",
        "address": "streetAddress",
        "bs": "buildingNumber"
    }
}';

$json = $fakerJson->generate($template);

echo $json;
```

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Contributing
------------

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% 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 ~0 days

Total

15

Last Release

797d ago

Major Versions

1.2.2 → 2.0.02024-06-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/42b44833dad7c9034294797f433a90a1c5ab7520a167b031aed2c07bb9504f64?d=identicon)[daavelar](/maintainers/daavelar)

---

Top Contributors

[![diegolist](https://avatars.githubusercontent.com/u/110676997?v=4)](https://github.com/diegolist "diegolist (26 commits)")[![daavelar](https://avatars.githubusercontent.com/u/7144672?v=4)](https://github.com/daavelar "daavelar (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/daavelar-faker-json/health.svg)

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

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[illuminate/pagination

The Illuminate Pagination package.

12234.6M1.1k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9350.2M310](/packages/illuminate-pipeline)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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