<?php

require(__DIR__ . "/../vendor/autoload.php");
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of TestModelHydrate
 *
 * @author guillaume
 */
$json = <<<EOF
{
    "glossary": {
        "title": "example glossary",
		"GlossDiv": {
            "title": "S",
			"GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
					"SortAs": "SGML",
					"GlossTerm": "Standard Generalized Markup Language",
					"Acronym": "SGML",
					"Abbrev": "ISO 8879:1986",
					"GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
						"GlossSeeAlso": ["GML", "XML"]
                    },
					"GlossSee": "markup"
                }
            }
        }
    }
}
EOF;
error_log($json);
$object = json_decode(trim($json));
error_log(json_last_error_msg());
error_log(print_r(Rad\Model\Model::hydrate($object), true));

Add Test for hydrate model
Add Test for hydrate model