Example #1
0
 /**
  * Populates the object with values from the JSON string.
  *
  * @param object $object The target object to populate values onto.
  * @param string $json   The JSON to populate values from.
  *
  * @return null|object
  */
 public static function Populate($object, $json)
 {
     $return = null;
     if (!is_null($object) && is_object($object)) {
         $instance = new self();
         $input = json_decode($json, true);
         $return = $instance->deserializeObject($object, $input, true);
     }
     return $return;
 }