PHPackages                             fernandothedev/jsonsql - 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. fernandothedev/jsonsql

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

fernandothedev/jsonsql
======================

Melhor coisa pra manipular json com php.

0.1.14(1y ago)26MITPHPPHP ^8.1

Since Oct 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/FernandoTheDev/jsonsql)[ Packagist](https://packagist.org/packages/fernandothedev/jsonsql)[ RSS](/packages/fernandothedev-jsonsql/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

JsonSQL - A terrible database
=============================

[](#jsonsql---a-terrible-database)

[![PHP](https://camo.githubusercontent.com/1a5e13126d38c1d05f712dae30e7f60ae0444a9c882e9e526349ccba27facb8d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e312d626c7565)](https://www.php.net/)[![Code style](https://camo.githubusercontent.com/baa83f7f7ce3b4e3f0e5510e7ce7c7acddf98134a9b6eebc49ba5accecedfb1b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d7374616e646172642d677265656e)](https://www.php-fig.org/psr/psr-2/)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://github.com/badfarm/zanzara/blob/develop/LICENSE.md)

**JsonSQL** is a way to use json as a database in testing or really small projects. **No IO control, no advanced logging system or anything like that.** If you want to use it, use it. You don't need to configure anything and it's super simple to use.

I believe that json is not good, and I believe that php is not ideal, there are problems like 2 requests and changing the file at the same time. Let's say someone changes the file and 0.01s later another person changes other information, the file has not yet been saved, I mean, if it is too wide it will certainly not have been saved in that time and will soon corrupt the data edited at 0.01s. Therefore, only use it if it is really for testing, or something very specific.

### Instalation

[](#instalation)

With composer install with the command:

```
composer require fernandothedev/jsonsql
```

Usage
-----

[](#usage)

The target json file must have at least open braces.

```
file.json: {}

```

### Class

[](#class)

Use the class using the **Fernando\\\\JsonSQL** namespace:

```
