PHPackages                             lostfocus/jf2 - 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. lostfocus/jf2

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

lostfocus/jf2
=============

Basic mapping and handling of jf2 files and objects

0.4.1(2mo ago)138MITPHPPHP 8.2.\*|8.3.\*|8.4.\*|8.5.\*CI passing

Since May 6Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/lostfocus/jf2)[ Packagist](https://packagist.org/packages/lostfocus/jf2)[ Docs](https://github.com/lostfocus/jf2)[ RSS](/packages/lostfocus-jf2/feed)WikiDiscussions develop Synced today

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

lostfocus/jf2
=============

[](#lostfocusjf2)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0c435e9bc4b96d273f0549665febfc79e3baee1a5163f55ca2559156b08de45a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f7374666f6375732f6a66322e737667)](https://packagist.org/packages/lostfocus/jf2)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)

A small-ish collection of classes to map/serialize JF2-Json files to typed objects and back. This is a pretty early version and is likely to break at any time.
If you do want to use it, please specify at least the minor version in your `composer.json`

[More infos on JF2](https://www.w3.org/TR/jf2/)

[Test JF2 files taken from here.](https://github.com/dissolve/jf2_validator)

Install
-------

[](#install)

Via Composer

```
$ composer require lostfocus/jf2
```

Usage
-----

[](#usage)

```
$entry = new Lostfocus\Jf2\Utility\Entry();
$entry->setUrl('https://example.com');
echo json_encode($entry, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
```

Testing
-------

[](#testing)

```
$ composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 98.2% 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 ~362 days

Total

5

Last Release

70d ago

PHP version history (3 changes)0.0.1PHP 8.0.\*|8.1.\*

0.4.0PHP 8.2.\*|8.3.\*

0.4.1PHP 8.2.\*|8.3.\*|8.4.\*|8.5.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/76531533d4ec8ef6b40757c24312a15f261e972240a60da68e254d4cd80d2e34?d=identicon)[lostfocus](/maintainers/lostfocus)

---

Top Contributors

[![lostfocus](https://avatars.githubusercontent.com/u/45055?v=4)](https://github.com/lostfocus "lostfocus (54 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lostfocus-jf2/health.svg)

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

###  Alternatives

[wythe/logistics

查询快递物流信息

3041.7k1](/packages/wythe-logistics)[sebkln/content-slug

Speaking URL fragments (anchors) - Adds a slug field for human-readable anchors ("domain.com/page/#my-section") to TYPO3 content elements. By default, this anchor is rendered as the header's id attribute.

1284.3k1](/packages/sebkln-content-slug)

PHPackages © 2026

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