public static function convertToJSON($bencode, $options = 0)
    {
        $object = self::decode($bencode);
        $json = json_encode($object, $options);

        return $json;
    }
public static function convertToJSON($bencode, $options = 0)
    {
        $object = self::decode($bencode);
        $json = json_encode($object, $options);

        return $json;
    }
public static function convertToJSON ( $ bencode , $ options = 0 ) { $ object = self :: decode ( $ bencode ) ; $ json = json_encode ( $ object , $ options ) ; return $ json ; }
Converts Bencode representation to JSON representation.

@param string $bencode Buffer containing the Bencode string.
@return string
Converts Bencode representation to JSON representation .