PHP code example of ryantxr / jsonmodel

1. Go to this page and download the library: Download ryantxr/jsonmodel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ryantxr / jsonmodel example snippets



use Ryantxr\JsonModel\Model;

$jsonInput = '
{
    "foo" : {
        "bar" : {
            "baz": [
                {"a": 100},
                {"b": 200},
                {"c": 300}
            ],
            "fiz" : {
                "x": "xyzzy", 
                "y": "yyzzy",
                "z": "zyzzy"
            },
            "buzz": [
                91, 92, 93, 94, 95
            ]
        }
    }
}';

$model = new Model($jsonInput);

$model = new \Ryantxr\Json\Model($jsonInput);