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(3mo ago)03811MITPHP

Since May 24Pushed 3mo 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 1mo ago

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

41

—

FairBetter than 89% of packages

Maintenance82

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

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

97d 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

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

517.9M7](/packages/avalara-avataxclient)[commercetools/commercetools-sdk

The official PHP SDK for the commercetools Composable Commerce APIs

19281.5k](/packages/commercetools-commercetools-sdk)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)

PHPackages © 2026

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