static function FromString($json)
    {
        $jsonObj = @\json_decode($json);
        if (!is_a($jsonObj, 'stdClass')) {
            return null; 
        }
        $result = new static();
        $class = new \ReflectionClass($result);
        $props = $class->getProperties(\ReflectionProperty::IS_PUBLIC & ~ \ReflectionProperty::IS_STATIC);
        foreach ($props as $prop) {
            $name = $prop->getName();
            if (isset($jsonObj->$name)) {
                $prop->setValue($result, $jsonObj->$name);
            }
        }
        return $result;
    }
static function FromString($json)
    {
        $jsonObj = @\json_decode($json);
        if (!is_a($jsonObj, 'stdClass')) {
            return null; 
        }
        $result = new static();
        $class = new \ReflectionClass($result);
        $props = $class->getProperties(\ReflectionProperty::IS_PUBLIC & ~ \ReflectionProperty::IS_STATIC);
        foreach ($props as $prop) {
            $name = $prop->getName();
            if (isset($jsonObj->$name)) {
                $prop->setValue($result, $jsonObj->$name);
            }
        }
        return $result;
    }
static function FromString ( $ json ) { $ jsonObj = @ \ json_decode ( $ json ) ; if ( ! is_a ( $ jsonObj , 'stdClass' ) ) { return null ; } $ result = new static ( ) ; $ class = new \ ReflectionClass ( $ result ) ; $ props = $ class -> getProperties ( \ ReflectionProperty :: IS_PUBLIC & ~ \ ReflectionProperty :: IS_STATIC ) ; foreach ( $ props as $ prop ) { $ name = $ prop -> getName ( ) ; if ( isset ( $ jsonObj -> $ name ) ) { $ prop -> setValue ( $ result , $ jsonObj -> $ name ) ; } } return $ result ; }
Creates an instance from json string
@param string $json The json string
@result JsonConvertible Returns the resulting object
Creates an instance from json string