PHPackages                             wallacesilva/phpjsonlite - 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. [Database &amp; ORM](/categories/database)
4. /
5. wallacesilva/phpjsonlite

ActiveLibrary[Database &amp; ORM](/categories/database)

wallacesilva/phpjsonlite
========================

A simple, self-contained, serverless, zero-configuration, json document store for PHP

0.1.2(10y ago)316APACHEPHPPHP &gt;=5.3.0

Since Sep 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/wallacesilva/phpjsonlite)[ Packagist](https://packagist.org/packages/wallacesilva/phpjsonlite)[ Docs](https://github.com/wallacesilva/phpjsonlite)[ RSS](/packages/wallacesilva-phpjsonlite/feed)WikiDiscussions master Synced 1mo ago

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

PHP JSONlite
============

[](#php-jsonlite)

##### A simple, self-contained, serverless, zero-configuration, [json](http://www.json.org/) document store. Based on [nodesocket/jsonlite](https://github.com/nodesocket/jsonlite).

[](#a-simple-self-contained-serverless-zero-configuration-json-document-store-based-on-nodesocketjsonlite)

JSONlite sandboxes the current working directory just like [SQLite](https://www.sqlite.org/). The data directory is named `jsonlite.data`, and each json document is saved pretty printed as a uuid.

Proof of Concept
----------------

[](#proof-of-concept)

JSONlite is a proof of concept, and it may not make any sense to actually use it in development or production. Read more in [nodesocket/jsonlite](https://github.com/nodesocket/jsonlite).

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

[](#installation)

```
composer require wallacesilva/phpjsonlite

```

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

[](#requirements)

1. php &gt;= 5.3

Usage
-----

[](#usage)

> You need declare the object to use the methods.

```
$jsonlite = new JSONlite\JSONlite();
// e.g.: $jsonlite->methodName();
```

#### set(` $object [,  $document_id=null]`)

[](#setstring-object--string-document_idnull)

> Set object using OR not document\_id

```
$object = array(
    'id'            => 1,
    'name'          => 'John Doe',
    'active'        => true,
    'permissions'   => array(
        'read'      => true,
        'write'     => false,
        'execute'   => true
    )
);
$document_id = $jsonlite->set($object);
// return also like: '666B81D6-3F8A-4D57-BA3F-11FA8FC47246'
```

#### get(` $document_id`)

[](#getstring-document_id)

> Get object using document\_id. Document id is a UUID

```
$object = $jsonlite->get($document_id);
// return also like:
/**
{
    "active": true,
    "name": "John Doe",
    "permissions": {
        "read": true,
        "write": false
    }
}
*/
```

#### delete(` $document_id`)

[](#deletestring-document_id)

> Delete object using document\_id.

```
$deleted = $jsonlite->delete($document_id)

```

#### drop()

[](#drop)

> Remove database folder. Default './jsonlite.data'

```
$jsonlite->drop()
```

#### setDataPath(` $dataPath`)

[](#setdatapathstring-datapath)

> Define new folder database. This is not required. Default is './jsonlite.data'

```
$jsonlite->setDataPath('/var/www/database/jsonlite.data/');

```

#### version

[](#version)

> Return version from Package

```
$jsonlite->version()
// return also like: 0.1.0
```

Changelog
---------

[](#changelog)

Support, Bugs, And Feature Requests
-----------------------------------

[](#support-bugs-and-feature-requests)

Create issues here in GitHub ().

Versioning
----------

[](#versioning)

For transparency and insight into the release cycle, and for striving to maintain backward compatibility, JSONlite will be maintained under the semantic versioning guidelines.

Releases will be numbered with the follow format:

`..`

And constructed with the following guidelines:

- Breaking backward compatibility bumps the major (and resets the minor and patch)
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
- Bug fixes and misc changes bumps the patch

For more information on semantic versioning, visit .

License &amp; Legal
-------------------

[](#license--legal)

Copyright 2015 Wallace Silva

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

```
http://www.apache.org/licenses/LICENSE-2.0

```

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3889d ago

### Community

Maintainers

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

---

Top Contributors

[![wallacesilva](https://avatars.githubusercontent.com/u/451606?v=4)](https://github.com/wallacesilva "wallacesilva (7 commits)")

---

Tags

databasenosqldriver

### Embed Badge

![Health badge](/badges/wallacesilva-phpjsonlite/health.svg)

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

###  Alternatives

[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[datastax/php-driver

DataStax PHP Driver for Apache Cassandra

437521.5k19](/packages/datastax-php-driver)[basho/riak

Official Riak client for PHP

159246.7k7](/packages/basho-riak)[danielmewes/php-rql

A PHP client driver for the RethinkDB query language (ReQL)

339183.6k14](/packages/danielmewes-php-rql)[mongodb/mongodb-extension

MongoDB driver extension

91919.8k](/packages/mongodb-mongodb-extension)[triagens/arangodb

ArangoDB PHP client

186189.4k19](/packages/triagens-arangodb)

PHPackages © 2026

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