jsondbphp / jsondb
JSON DB for APIs Testing for Your Minimalist Project
Fund package maintenance!
codewithsushil
ashishkumbhar01
Patreon
Open Collective
Buy Me A Coffee
paypal.me/codewithsushil
Requires
- ext-json: *
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2025-04-28 01:01:04 UTC
README
- JSON DB for APIs Testing for Your Minimalist Project
Example
Full example of json db
<? 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 "<pre>"; print_r($result); echo "</pre>";