Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/codewithsushil/json-db

JSON DB for APIs Testing and minimalist project
https://github.com/codewithsushil/json-db

json-api json-database json-db json-server

Last synced: 1 day ago
JSON representation

JSON DB for APIs Testing and minimalist project

Awesome Lists containing this project

README

        

## json-db
- JSON DB for APIs Testing for Your Minimalist Project

### Example
Full example of json db
```php

require "vendor/autoload.php";

use App\JSONDatabase;

$path = 'data/users.json';

$db = new JSONDatabase($path);

$data = [
'id' => 1,
'name' => 'Sushil',
'age' => 23,
'dev' => true,
'lang' => ['php','javascript','sql']
];

// post data
$db->write($data);

// fetch data
$result = $db->read();

echo "

";

print_r($result);
echo "
";

```