PHPackages                             brokeyourbike/json-request-result - 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. brokeyourbike/json-request-result

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

brokeyourbike/json-request-result
=================================

Interface and trait for JSON responses

1.0.2(3y ago)0542[1 PRs](https://github.com/brokeyourbike/json-request-result-php/pulls)1MPL-2.0PHPPHP ^7.4|^8.0CI failing

Since Oct 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/brokeyourbike/json-request-result-php)[ Packagist](https://packagist.org/packages/brokeyourbike/json-request-result)[ RSS](/packages/brokeyourbike-json-request-result/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (1)

json-request-result
===================

[](#json-request-result)

[![Latest Stable Version](https://camo.githubusercontent.com/9c0ff2f2145f2e0433905d56110a5f445b2d7e27c3323c701a30c3e0872863ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f62726f6b65796f757262696b652f6a736f6e2d726571756573742d726573756c742d706870)](https://github.com/brokeyourbike/json-request-result-php/releases)[![Total Downloads](https://camo.githubusercontent.com/7537e7fc56e6f368d1194a69d3b87f487fb7fe804d6c8acc18c81b4ff5dd5222/68747470733a2f2f706f7365722e707567782e6f72672f62726f6b65796f757262696b652f6a736f6e2d726571756573742d726573756c742f646f776e6c6f616473)](https://packagist.org/packages/brokeyourbike/json-request-result)[![Maintainability](https://camo.githubusercontent.com/2ff1f46a18e7f9fc1b6447c128d1ac5a812ccd12c801e25442a3621568fbe2f8/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61316637643237363965356637333863386332612f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/brokeyourbike/json-request-result-php/maintainability)[![Test Coverage](https://camo.githubusercontent.com/0961350d384ff02df9160c0b4b50be442ab9daae6b45091b683bf17a4265c8b8/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61316637643237363965356637333863386332612f746573745f636f766572616765)](https://codeclimate.com/github/brokeyourbike/json-request-result-php/test_coverage)

Interface and trait for JSON responses

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

[](#installation)

```
composer require brokeyourbike/json-request-result
```

Usage
-----

[](#usage)

```
use Psr\Http\Message\ResponseInterface;
use BrokeYourBike\JsonRequestResult\JsonRequestResultTrait;
use BrokeYourBike\JsonRequestResult\JsonRequestResultInterface;

class Result implements JsonRequestResultInterface
{
    use JsonRequestResultTrait;

    public function __construct(ResponseInterface $response)
    {
        $this->statusCode = $response->getStatusCode();
        $this->responseBody = (string) $response->getBody();
    }
}
```

Authors
-------

[](#authors)

- [Ivan Stasiuk](https://github.com/brokeyourbike) | [Twitter](https://twitter.com/brokeyourbike) | [LinkedIn](https://www.linkedin.com/in/brokeyourbike) | [stasi.uk](https://stasi.uk)

License
-------

[](#license)

[Mozilla Public License v2.0](https://github.com/brokeyourbike/json-request-result-php/blob/main/LICENSE)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.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 ~286 days

Total

3

Last Release

1145d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/114f3c6e8506e0bba763451e8e4bcc3e94d662c2dce982a910b5d7b3444593cf?d=identicon)[brokeyourbike](/maintainers/brokeyourbike)

---

Top Contributors

[![brokeyourbike](https://avatars.githubusercontent.com/u/1554371?v=4)](https://github.com/brokeyourbike "brokeyourbike (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

hacktoberfestjsonjson-decodingphpphp8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brokeyourbike-json-request-result/health.svg)

```
[![Health](https://phpackages.com/badges/brokeyourbike-json-request-result/health.svg)](https://phpackages.com/packages/brokeyourbike-json-request-result)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346132.9M112](/packages/google-cloud-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[anthropic-ai/sdk

Anthropic PHP SDK

163583.3k15](/packages/anthropic-ai-sdk)

PHPackages © 2026

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