public static function convertFromJSON($json)
    {
        $object = json_decode($json, true);
        $bencode = self::encode($object);

        return $bencode;
    }
public static function convertFromJSON($json)
    {
        $object = json_decode($json, true);
        $bencode = self::encode($object);

        return $bencode;
    }
public static function convertFromJSON ( $ json ) { $ object = json_decode ( $ json , true ) ; $ bencode = self :: encode ( $ object ) ; return $ bencode ; }
Converts JSON representation to Bencode representation.

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