PHPackages                             jdwx/json-api-client - 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. [API Development](/categories/api)
4. /
5. jdwx/json-api-client

ActiveLibrary[API Development](/categories/api)

jdwx/json-api-client
====================

A simple JSON API client and supporting tools.

v1.2.5(4mo ago)04111MITPHP

Since May 24Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/jdwx/json-api-client)[ Packagist](https://packagist.org/packages/jdwx/json-api-client)[ RSS](/packages/jdwx-json-api-client/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (9)Versions (19)Used By (1)

jdwx/json-api-client
====================

[](#jdwxjson-api-client)

A simple PHP module for interacting with JSON API services.

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

[](#installation)

You can require it directly with Composer:

```
composer require jdwx/json-api-client
```

Or download the source from GitHub:

Requirements
------------

[](#requirements)

This module requires PHP 8.3 or later. The implementation depends on the excellent [Guzzle](https://docs.guzzlephp.org/en/stable/)HTTP client implementation, which provides all the needed features for extended streaming support. It also requires the JSON extension.

Usage
-----

[](#usage)

Here is a basic usage example:

```
$client = JDWX\JsonApiClient\HttpClient::withGuzzle( 'https://api.example.com' );
$rsp = $client->request( 'GET', '/v1/resource' );
if ( ! $rsp->isSuccess() ) {
    $uStatus = $rsp->status();
    echo "{$uStatus} Error: ", $rsp->body(), "\n";
    exit( 1 );
}
if ( ! $rsp->isJson() ) {
    $stContentType = $rsp->getOneHeader( 'content-type' ) ?? 'none';
    echo "Error: Expected JSON content-type, got: {$stContentType}\n";
    exit( 1 );
}
$data = $rsp->json();
var_dump( $data );
```

There is also 100% test coverage for this module, which provides additional examples of usage.

Stability
---------

[](#stability)

This module is considered stable and is used in production code. However, it was newly-developed in 2024 based on multiple previous implementations, so it hasn't received the same level of testing and extensive use as some of the other modules in this suite. That said, it successfully processes hundreds of thousands of API calls per day.

History
-------

[](#history)

This module was refactored out of four separate existing modules for interacting with JSON APIs in a larger codebase. It has been rewritten essentially from scratch. It was initially released in 2024.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance74

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Recently: every ~93 days

Total

17

Last Release

142d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f71b4b976170f89eac19be48c7381a27c49ed8c9cb5e8e6ff05a2ad7583efa13?d=identicon)[jdwx](/maintainers/jdwx)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jdwx-json-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/jdwx-json-api-client/health.svg)](https://phpackages.com/packages/jdwx-json-api-client)
```

###  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)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M733](/packages/sylius-sylius)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M158](/packages/algolia-algoliasearch-client-php)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)

PHPackages © 2026

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