private function getPaths(&$s, $r = "#")
    {
        $this->paths[$r] = &$s;
        if (is_array($s) || is_object($s)) {
            foreach ($s as $k => &$v) {
                if ($k !== "\$ref") {
                    $this->getPaths($v, $r == "#" ? "#{$k}" : "{$r}.{$k}");
                }
            }
        }
    }