public static function normalize($bemJson)
    {
        switch (true) {
            // instance of JsonCollection
            case $bemJson instanceof self:
                return $bemJson;

            // casual list
            case isList($bemJson);
                $bemJson = static::flattenList($bemJson);
            case $bemJson instanceof \Iterator:
                $content = [];
                foreach ($bemJson as $node) {
                    $content[] = static::normalizeItem($node);
                }
                $ret = $content;
                break;

            // casual bemJson node
            case is_array($bemJson):
                $ret = [static::normalizeItem($bemJson)];
                break;

            // instance of Json
            case $bemJson instanceof Json:
                $ret = [$bemJson];
                break;

            // custom object (not array)
            case is_object($bemJson):
                $ret = [new Json($bemJson)];
                break;

            case is_scalar($bemJson):
                $ret = [$bemJson];
                break;

            default:
                throw new \InvalidArgumentException('Passed variable is not an array or object or string');
        }

        $res = new static($ret);

        return $res;
    }