PHPackages                             normeno/gjson - 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. normeno/gjson

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

normeno/gjson
=============

Generate output based on Google JSON style guide

v1.0.9(8y ago)065MITPHPPHP ~5.6|~7.0

Since Nov 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/normeno/gjson)[ Packagist](https://packagist.org/packages/normeno/gjson)[ Docs](https://github.com/normeno/gjson)[ RSS](/packages/normeno-gjson/feed)WikiDiscussions master Synced 3d ago

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

Gjson
=====

[](#gjson)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0ca6d8ea45aeab322a680ab942ba73425a258752e6605908c216d815de1c359a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f726d656e6f2f676a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/normeno/gjson#lastest)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/bd3da32a77ada34d7af79d3e7406db14d8e94a5f7260ac8599b6d8611bb9f170/68747470733a2f2f7472617669732d63692e6f72672f6e6f726d656e6f2f676a736f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/normeno/gjson)[![Coverage Status](https://camo.githubusercontent.com/d7b8b3a0b53b94f6a82da46d454881680a5bc1f0b90ecb197c09a36c84499871/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6e6f726d656e6f2f676a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/normeno/gjson/code-structure)[![Quality Score](https://camo.githubusercontent.com/4fb3b20b203db81c6e13f7bf5f828162d67bf10505132ff205c793a23c3119a3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6e6f726d656e6f2f676a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/normeno/gjson)[![Total Downloads](https://camo.githubusercontent.com/298ff16852a0141b489432920dc2fb790ec402067db6fa3e4296ed6afb46328a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f726d656e6f2f676a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/normeno/gjson)

Gjson is a PHP library to work under the Google Json Style Guide standard.

Install
-------

[](#install)

Via Composer

```
$ composer require normeno/gjson
```

Usage
-----

[](#usage)

### Remove Empties

[](#remove-empties)

```
$format = new Format();
echo $format->removeEmpty(['foo' => 'bar', 'null' => null, 'empty' => '', 'zero' => 0]);
```

### Set RFC3339

[](#set-rfc3339)

```
$format = new Format();
echo $format->setRfc3339('1989-10-05');
```

### Convert Snake to Camel

[](#convert-snake-to-camel)

```
$format = new Format();
echo $format->convertSnakeToCamel([
    'laTaM_cOuNtRy' => 'Chile',
    'latam_REGION'  => 'Metropolitana',
    'LATAM_city'    => 'Santiago'
]);
```

### Set ISO-6793

[](#set-iso-6793)

```
$format = new Format();
echo $format->setIso6709(['+40.6894', '-074.0447']);
```

### Error Response

[](#error-response)

```
$response = new Response();
echo $this->response->error(404, 'File Not Found');
```

### Success Response

[](#success-response)

```
$response = new Response();
$data = [
    'items' => [
        'company'   => 'Google',
        'website'   => 'https://www.google.com/'
    ]
];

echo $this->response->success($data);
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [normeno](https://github.com/normeno)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

12

Last Release

3111d ago

Major Versions

v0.4 → v1.0.02017-11-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e188ec7b036723cd33a0261deb952c5d82efa1de708daf5aec9e587386f183c?d=identicon)[normeno](/maintainers/normeno)

---

Tags

NormenoGjson

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/normeno-gjson/health.svg)

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

###  Alternatives

[ashallendesign/short-url

A Laravel package for creating shortened URLs for your web apps.

1.4k1.9M4](/packages/ashallendesign-short-url)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[intervention/zodiac

Zodiac Sign Calculator

58191.7k](/packages/intervention-zodiac)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[solspace/craft-calendar

The most powerful event management and calendaring plugin!

1830.8k1](/packages/solspace-craft-calendar)

PHPackages © 2026

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