I am receiving from a form the following urlencoded string %F0%9D%90%B4%F0%9D%91%99%F0%9D%91%92%F0%9D%91%97%F0%9D%91%8E%F0%9D%91%9B%F0%9D%91%91%F0%9D%91%9F%F0%9D%91%8E
If I decode it I get the following formatted text: ๐ด๐๐๐๐๐๐๐๐
Is there any way with PHP to get the plain "Alejandra" text from the encoded or decoded string?
I have tried without success several ways to do it with
mb_convert_encoding($string, "UTF-16",mb_detect_encoding($string))
iconv('utf-16', 'utf-8', rawurldecode($string)
and any other solution I could in stackoverflow.
Edit:
I tried the proposed solution $strAscii = iconv('UTF-8','ASCII//TRANSLIT',$str); but it deletes the special characters such as รกรฉรญรณรบรฑรง which we need to stay.
Expected result
input: ๐ด๐๐๐๐๐๐๐๐
output: Alejandra
input: รlejandra
output: รlejandra
Thank you in advance.
urldecode or rawurldecode is sufficient.
$string = "%F0%9D%90%B4%F0%9D%91%99%F0%9D%91%92%F0%9D%91%97%F0%9D%91%8E%F0%9D%91%9B%F0%9D%91%91%F0%9D%91%9F%F0%9D%91%8E";
$str = urldecode($string);
var_dump($str);
//string(36) "๐ด๐๐๐๐๐๐๐๐"
Demo: https://3v4l.org/OMQ35
A special debugger gives me: string(36) UTF-8mb4. This means that there are also UTF-8 characters in the string that require 4 bytes. The character A is the Unicode character โ๐ดโ (U+1D434).
Note:
If the special UTF-8 characters cause problems, you can try to display the strings as ASCII characters with iconv.
$strAscii = iconv('UTF-8','ASCII//TRANSLIT',$str);
//string(9) "Alejandra"
What you are getting is called a "psuedo-alphabet", you can see a list of them here: https://qaz.wtf/u/convert.cgi. The one that you appear to be getting can be seen here: https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols
Basically what you need to do is take the string, split it and use a lookup table to convert it back to regular characters. This implementation is terribly efficient but that's because I grabbed the alphabets from the above Wikipedia page and was too lazy to reorganise it.
function math_symbols_to_plain_text($input, $alphabet)
{
$alphabets = [
['a','๐','๐','๐','๐บ','๐ฎ','๐ข','๐','๐ถ','๐ช','๐','๐','๐','๐'],
['b','๐','๐','๐','๐ป','๐ฏ','๐ฃ','๐','๐ท','๐ซ','๐','๐','๐','๐'],
['c','๐','๐','๐','๐ผ','๐ฐ','๐ค','๐','๐ธ','๐ฌ','๐ ','๐','๐','๐'],
['d','๐','๐','๐
','๐ฝ','๐ฑ','๐ฅ','๐','๐น','๐ญ','๐ก','๐','๐','๐'],
['e','๐','๐','๐','๐พ','๐ฒ','๐ฆ','๐','โฏ','๐ฎ','๐ข','๐','๐','๐'],
['f','๐','๐','๐','๐ฟ','๐ณ','๐ง','๐','๐ป','๐ฏ','๐ฃ','๐','๐','๐'],
['g','๐ ','๐','๐','๐','๐ด','๐จ','๐','โ','๐ฐ','๐ค','๐','๐','๐'],
['h','๐ก','โ','๐','๐','๐ต','๐ฉ','๐','๐ฝ','๐ฑ','๐ฅ','๐','๐','๐'],
['i','๐ข','๐','๐','๐','๐ถ','๐ช','๐','๐พ','๐ฒ','๐ฆ','๐','๐','๐'],
['j','๐ฃ','๐','๐','๐','๐ท','๐ซ','๐','๐ฟ','๐ณ','๐ง','๐','๐','๐'],
['k','๐ค','๐','๐','๐','๐ธ','๐ฌ','๐ ','๐','๐ด','๐จ','๐','๐','๐'],
['l','๐ฅ','๐','๐','๐
','๐น','๐ญ','๐ก','๐','๐ต','๐ฉ','๐','๐','๐'],
['m','๐ฆ','๐','๐','๐','๐บ','๐ฎ','๐ข','๐','๐ถ','๐ช','๐','๐','๐'],
['n','๐ง','๐','๐','๐','๐ป','๐ฏ','๐ฃ','๐','๐ท','๐ซ','๐','๐','๐'],
['o','๐จ','๐','๐','๐','๐ผ','๐ฐ','๐ค','โด','๐ธ','๐ฌ','๐','๐','๐ '],
['p','๐ฉ','๐','๐','๐','๐ฝ','๐ฑ','๐ฅ','๐
','๐น','๐ญ','๐','๐','๐ก'],
['q','๐ช','๐','๐','๐','๐พ','๐ฒ','๐ฆ','๐','๐บ','๐ฎ','๐','๐','๐ข'],
['r','๐ซ','๐','๐','๐','๐ฟ','๐ณ','๐ง','๐','๐ป','๐ฏ','๐','๐','๐ฃ'],
['s','๐ฌ','๐ ','๐','๐','๐','๐ด','๐จ','๐','๐ผ','๐ฐ','๐','๐','๐ค'],
['t','๐ญ','๐ก','๐','๐','๐','๐ต','๐ฉ','๐','๐ฝ','๐ฑ','๐','๐','๐ฅ'],
['u','๐ฎ','๐ข','๐','๐','๐','๐ถ','๐ช','๐','๐พ','๐ฒ','๐','๐','๐ฆ'],
['v','๐ฏ','๐ฃ','๐','๐','๐','๐ท','๐ซ','๐','๐ฟ','๐ณ','๐','๐','๐ง'],
['w','๐ฐ','๐ค','๐','๐','๐','๐ธ','๐ฌ','๐','๐','๐ด','๐','๐ ','๐จ'],
['x','๐ฑ','๐ฅ','๐','๐','๐
','๐น','๐ญ','๐','๐','๐ต','๐','๐ก','๐ฉ'],
['y','๐ฒ','๐ฆ','๐','๐','๐','๐บ','๐ฎ','๐','๐','๐ถ','๐','๐ข','๐ช'],
['z','๐ณ','๐ง','๐','๐','๐','๐ป','๐ฏ','๐','๐','๐ท','๐','๐ฃ','๐ซ'],
['A','๐','๐ด','๐จ','๐ ','๐','๐','๐ผ','๐','๐','๐','๐ฌ','๐ฐ','๐ธ'],
['B','๐','๐ต','๐ฉ','๐ก','๐','๐','๐ฝ','โฌ','๐','๐
','๐ญ','๐ฑ','๐น'],
['C','๐','๐ถ','๐ช','๐ข','๐','๐','๐พ','๐','๐','โญ','๐ฎ','๐ฒ','โ'],
['D','๐','๐ท','๐ซ','๐ฃ','๐','๐','๐ฟ','๐','๐','๐','๐ฏ','๐ณ','๐ป'],
['E','๐','๐ธ','๐ฌ','๐ค','๐','๐','๐','โฐ','๐','๐','๐ฐ','๐ด','๐ผ'],
['F','๐
','๐น','๐ญ','๐ฅ','๐','๐','๐','โฑ','๐','๐','๐ฑ','๐ต','๐ฝ'],
['G','๐','๐บ','๐ฎ','๐ฆ','๐','๐','๐','๐ข','๐','๐','๐ฒ','๐ถ','๐พ'],
['H','๐','๐ป','๐ฏ','๐ง','๐','๐','๐','โ','๐','โ','๐ณ','๐ท','โ'],
['I','๐','๐ผ','๐ฐ','๐จ','๐','๐','๐','โ','๐','โ','๐ด','๐ธ','๐'],
['J','๐','๐ฝ','๐ฑ','๐ฉ','๐','๐','๐
','๐ฅ','๐','๐','๐ต','๐น','๐'],
['K','๐','๐พ','๐ฒ','๐ช','๐','๐','๐','๐ฆ','๐','๐','๐ถ','๐บ','๐'],
['L','๐','๐ฟ','๐ณ','๐ซ','๐','๐','๐','โ','๐','๐','๐ท','๐ป','๐'],
['M','๐','๐','๐ด','๐ฌ','๐ ','๐','๐','โณ','๐','๐','๐ธ','๐ผ','๐'],
['N','๐','๐','๐ต','๐ญ','๐ก','๐','๐','๐ฉ','๐','๐','๐น','๐ฝ','โ'],
['O','๐','๐','๐ถ','๐ฎ','๐ข','๐','๐','๐ช','๐','๐','๐บ','๐พ','๐'],
['P','๐','๐','๐ท','๐ฏ','๐ฃ','๐','๐','๐ซ','๐','๐','๐ป','๐ฟ','โ'],
['Q','๐','๐','๐ธ','๐ฐ','๐ค','๐','๐','๐ฌ','๐ ','๐','๐ผ','๐','โ'],
['R','๐','๐
','๐น','๐ฑ','๐ฅ','๐','๐','โ','๐ก','โ','๐ฝ','๐','โ'],
['S','๐','๐','๐บ','๐ฒ','๐ฆ','๐','๐','๐ฎ','๐ข','๐','๐พ','๐','๐'],
['T','๐','๐','๐ป','๐ณ','๐ง','๐','๐','๐ฏ','๐ฃ','๐','๐ฟ','๐','๐'],
['U','๐','๐','๐ผ','๐ด','๐จ','๐','๐','๐ฐ','๐ค','๐','๐','๐','๐'],
['V','๐','๐','๐ฝ','๐ต','๐ฉ','๐','๐','๐ฑ','๐ฅ','๐','๐','๐
','๐'],
['W','๐','๐','๐พ','๐ถ','๐ช','๐','๐','๐ฒ','๐ฆ','๐','๐','๐','๐'],
['X','๐','๐','๐ฟ','๐ท','๐ซ','๐','๐','๐ณ','๐ง','๐','๐','๐','๐'],
['Y','๐','๐','๐','๐ธ','๐ฌ','๐ ','๐','๐ด','๐จ','๐','๐','๐','๐'],
['Z','๐','๐','๐','๐น','๐ญ','๐ก','๐','๐ต','๐ฉ','โจ','๐
','๐','โค']
];
$replace = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
$lookup = [
'serif-normal',
'serif-bold',
'serif-italic',
'serif-bolditalic',
'sans-normal',
'sans-bold',
'sans-italic',
'sans-bolditalic',
'script-normal',
'script-bold',
'franktur-normal',
'fraktur-bold',
'monospace',
'doublestruck'
];
$map_index = array_search($alphabet, $lookup);
$split = mb_str_split($input);
$output = '';
foreach ($split as $char) {
foreach ($alphabets as $i => $letter) {
if ($letter[$map_index] === $char)
$output .= $replace[$i];
}
}
return $output;
}
$input = '๐ด๐๐๐๐๐๐๐๐';
$output = math_symbols_to_plain_text($input, 'serif-italic');
echo $input . PHP_EOL . $output . PHP_EOL;
Yields:
๐ด๐๐๐๐๐๐๐๐
Alejandra
If I am not wrong, you are trying to decode URL then why you are not trying to use urldecode()
follow this .PHP DOC
I am trying to decode a string in PHP but I have not idea what the encoding is.
My string is
\x5B\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20d\x27Asni\x5Cu00e8res\x20sur\x20Seine\x20Belfort\x22,\x22id\x22\x3A\x225337\x22,\x22lati\x22\x3A\x2248.907864\x22,\x22long\x22\x3A\x222.268167\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20d\x27Asni\x5Cu00e8res\x20sur\x20Seine\x20Les\x20Hauts\x20d\x27Asni\x5Cu00e8res\x22,\x22id\x22\x3A\x225338\x22,\x22lati\x22\x3A\x2248.925983\x22,\x22long\x22\x3A\x222.274256\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Bagneux\x20Port\x20Galand\x22,\x22id\x22\x3A\x225339\x22,\x22lati\x22\x3A\x2248.788372\x22,\x22long\x22\x3A\x222.317539\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Bois\x20Colombes\x20Les\x20Bruy\x5Cu00e8res\x22,\x22id\x22\x3A\x225340\x22,\x22lati\x22\x3A\x2248.908581\x22,\x22long\x22\x3A\x222.262088\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Colombes\x20Foss\x5Cu00e9\x20Jean\x22,\x22id\x22\x3A\x225342\x22,\x22lati\x22\x3A\x2248.93106\x22,\x22long\x22\x3A\x222.267059\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Colombes\x20Wiener\x22,\x22id\x22\x3A\x225343\x22,\x22lati\x22\x3A\x2248.915141\x22,\x22long\x22\x3A\x222.246733\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Courbevoie\x20\x2D\x20Quartier\x20de\x20B\x5Cu00e9con\x22,\x22id\x22\x3A\x225344\x22,\x22lati\x22\x3A\x2248.901328\x22,\x22long\x22\x3A\x222.265769\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Courbevoie\x20\x2D\x20Quartier\x20Faubourg\x20de\x20l\x27Arche\x22,\x22id\x22\x3A\x225345\x22,\x22lati\x22\x3A\x2248.897737\x22,\x22long\x22\x3A\x222.238265\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20Meudon\x20la\x20For\x5Cu00eat\x20Place\x20Centrale\x22,\x22id\x22\x3A\x225346\x22,\x22lati\x22\x3A\x2248.787749\x22,\x22long\x22\x3A\x222.227974\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2010\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224463\x22,\x22lati\x22\x3A\x2248.871982\x22,\x22long\x22\x3A\x222.357889\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2012\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224464\x22,\x22lati\x22\x3A\x2248.840246\x22,\x22long\x22\x3A\x222.388204\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2014\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224465\x22,\x22lati\x22\x3A\x2248.832864\x22,\x22long\x22\x3A\x222.326462\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2015\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224475\x22,\x22lati\x22\x3A\x2248.841647\x22,\x22long\x22\x3A\x222.299668\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2016\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224466\x22,\x22lati\x22\x3A\x2248.863973\x22,\x22long\x22\x3A\x222.277212\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2017\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224467\x22,\x22lati\x22\x3A\x2248.883034\x22,\x22long\x22\x3A\x222.32408\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2018\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224468\x22,\x22lati\x22\x3A\x2248.892666\x22,\x22long\x22\x3A\x222.337346\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2019\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224461\x22,\x22lati\x22\x3A\x2248.876334\x22,\x22long\x22\x3A\x222.39318\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2020\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224469\x22,\x22lati\x22\x3A\x2248.864976\x22,\x22long\x22\x3A\x222.39871\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x205\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224471\x22,\x22lati\x22\x3A\x2248.846319\x22,\x22long\x22\x3A\x222.344516\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x207\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224472\x22,\x22lati\x22\x3A\x2248.856888\x22,\x22long\x22\x3A\x222.319964\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x208\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224473\x22,\x22lati\x22\x3A\x2248.877862\x22,\x22long\x22\x3A\x222.317804\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x209\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224474\x22,\x22lati\x22\x3A\x2248.872497\x22,\x22long\x22\x3A\x222.340366\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20d\x27ALFORTVILLE\x22,\x22id\x22\x3A\x225392\x22,\x22lati\x22\x3A\x2248.80529\x22,\x22long\x22\x3A\x222.420021\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20d\x27ARCUEIL\x22,\x22id\x22\x3A\x225032\x22,\x22lati\x22\x3A\x2248.805973\x22,\x22long\x22\x3A\x222.336826\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20ASNIERES\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224799\x22,\x22lati\x22\x3A\x2248.910354\x22,\x22long\x22\x3A\x222.289417\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20AUBERVILLIERS\x22,\x22id\x22\x3A\x224825\x22,\x22lati\x22\x3A\x2248.914652\x22,\x22long\x22\x3A\x222.381673\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BAGNEUX\x22,\x22id\x22\x3A\x224800\x22,\x22lati\x22\x3A\x2248.798652\x22,\x22long\x22\x3A\x222.304296\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BAGNOLET\x22,\x22id\x22\x3A\x224827\x22,\x22lati\x22\x3A\x2248.868921\x22,\x22long\x22\x3A\x222.417979\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BOIS\x20COLOMBES\x22,\x22id\x22\x3A\x224824\x22,\x22lati\x22\x3A\x2248.914476\x22,\x22long\x22\x3A\x222.267797\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BOULOGNE\x20BILLANCOURT\x22,\x22id\x22\x3A\x224801\x22,\x22lati\x22\x3A\x2248.835388\x22,\x22long\x22\x3A\x222.24031\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CACHAN\x22,\x22id\x22\x3A\x224859\x22,\x22lati\x22\x3A\x2248.794443\x22,\x22long\x22\x3A\x222.331244\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHARENTON\x20LE\x20PONT\x22,\x22id\x22\x3A\x225395\x22,\x22lati\x22\x3A\x2248.819851\x22,\x22long\x22\x3A\x222.415667\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATENAY\x20MALABRY\x22,\x22id\x22\x3A\x224802\x22,\x22lati\x22\x3A\x2248.767087\x22,\x22long\x22\x3A\x222.277421\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATILLON\x22,\x22id\x22\x3A\x225382\x22,\x22lati\x22\x3A\x2248.799868\x22,\x22long\x22\x3A\x222.289823\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATOU\x22,\x22id\x22\x3A\x224531\x22,\x22lati\x22\x3A\x2248.890074\x22,\x22long\x22\x3A\x222.157537\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHOISY\x20LE\x20ROI\x22,\x22id\x22\x3A\x224861\x22,\x22lati\x22\x3A\x2248.762448\x22,\x22long\x22\x3A\x222.406938\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CLAMART\x22,\x22id\x22\x3A\x224803\x22,\x22lati\x22\x3A\x2248.800313\x22,\x22long\x22\x3A\x222.263162\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CLICHY\x22,\x22id\x22\x3A\x224804\x22,\x22lati\x22\x3A\x2248.902389\x22,\x22long\x22\x3A\x222.304312\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20COLOMBES\x22,\x22id\x22\x3A\x224805\x22,\x22lati\x22\x3A\x2248.92276\x22,\x22long\x22\x3A\x222.254343\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20COURBEVOIE\x22,\x22id\x22\x3A\x224806\x22,\x22lati\x22\x3A\x2248.895463\x22,\x22long\x22\x3A\x222.2565\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20DRANCY\x22,\x22id\x22\x3A\x224831\x22,\x22lati\x22\x3A\x2248.925691\x22,\x22long\x22\x3A\x222.389513\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20FRESNES\x22,\x22id\x22\x3A\x225398\x22,\x22lati\x22\x3A\x2248.75534\x22,\x22long\x22\x3A\x222.322471\x22\x7D,\x7B\x22name\x22\x3A\x22mairie\x20de\x20Garches\x22,\x22id\x22\x3A\x225287\x22,\x22lati\x22\x3A\x2248.843147\x22,\x22long\x22\x3A\x222.186586\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20GENNEVILLIERS\x22,\x22id\x22\x3A\x224807\x22,\x22lati\x22\x3A\x2248.925846\x22,\x22long\x22\x3A\x222.294367\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20HOUILLES\x22,\x22id\x22\x3A\x224535\x22,\x22lati\x22\x3A\x2248.923084\x22,\x22long\x22\x3A\x222.186666\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20ISSY\x20LES\x20MOULINEAUX\x22,\x22id\x22\x3A\x224808\x22,\x22lati\x22\x3A\x2248.82423\x22,\x22long\x22\x3A\x222.273643\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20IVRY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224864\x22,\x22lati\x22\x3A\x2248.807809\x22,\x22long\x22\x3A\x222.374647\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20L\x27HAY\x20LES\x20ROSES\x22,\x22id\x22\x3A\x224868\x22,\x22lati\x22\x3A\x2248.778867\x22,\x22long\x22\x3A\x222.337234\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LA\x20COURNEUVE\x22,\x22id\x22\x3A\x224835\x22,\x22lati\x22\x3A\x2248.926341\x22,\x22long\x22\x3A\x222.391157\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LA\x20GARENNE\x20COLOMBES\x22,\x22id\x22\x3A\x224809\x22,\x22lati\x22\x3A\x2248.906762\x22,\x22long\x22\x3A\x222.246125\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20BOURGET\x22,\x22id\x22\x3A\x224837\x22,\x22lati\x22\x3A\x2248.934871\x22,\x22long\x22\x3A\x222.425765\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20PLESSIS\x20ROBINSON\x22,\x22id\x22\x3A\x224823\x22,\x22lati\x22\x3A\x2248.78248\x22,\x22long\x22\x3A\x222.262036\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20PRE\x20SAINT\x20GERVAIS\x22,\x22id\x22\x3A\x224838\x22,\x22lati\x22\x3A\x2248.883069\x22,\x22long\x22\x3A\x222.403281\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LES\x20LILAS\x22,\x22id\x22\x3A\x224840\x22,\x22lati\x22\x3A\x2248.880519\x22,\x22long\x22\x3A\x222.41849\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LEVALLOIS\x22,\x22id\x22\x3A\x224810\x22,\x22lati\x22\x3A\x2248.893086\x22,\x22long\x22\x3A\x222.288514\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MALAKOFF\x22,\x22id\x22\x3A\x224811\x22,\x22lati\x22\x3A\x2248.820888\x22,\x22long\x22\x3A\x222.301668\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MEUDON\x22,\x22id\x22\x3A\x224812\x22,\x22lati\x22\x3A\x2248.812558\x22,\x22long\x22\x3A\x222.238593\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MONTROUGE\x22,\x22id\x22\x3A\x224813\x22,\x22lati\x22\x3A\x2248.818705\x22,\x22long\x22\x3A\x222.319896\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20NANTERRE\x22,\x22id\x22\x3A\x224814\x22,\x22lati\x22\x3A\x2248.892044\x22,\x22long\x22\x3A\x222.205266\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20NEUILLY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224815\x22,\x22lati\x22\x3A\x2248.885111\x22,\x22long\x22\x3A\x222.266186\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20PANTIN\x22,\x22id\x22\x3A\x224845\x22,\x22lati\x22\x3A\x2248.896479\x22,\x22long\x22\x3A\x222.401907\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20PUTEAUX\x22,\x22id\x22\x3A\x224816\x22,\x22lati\x22\x3A\x2248.8843\x22,\x22long\x22\x3A\x222.236835\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20RUEIL\x20MALMAISON\x22,\x22id\x22\x3A\x224817\x22,\x22lati\x22\x3A\x2248.877939\x22,\x22long\x22\x3A\x222.180679\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20CLOUD\x22,\x22id\x22\x3A\x224818\x22,\x22lati\x22\x3A\x2248.843706\x22,\x22long\x22\x3A\x222.219356\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x2DDENIS\x22,\x22id\x22\x3A\x224851\x22,\x22lati\x22\x3A\x2248.936005\x22,\x22long\x22\x3A\x222.358906\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20MANDE\x22,\x22id\x22\x3A\x225407\x22,\x22lati\x22\x3A\x2248.843501\x22,\x22long\x22\x3A\x222.419041\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20MAURICE\x22,\x22id\x22\x3A\x224873\x22,\x22lati\x22\x3A\x2248.818091\x22,\x22long\x22\x3A\x222.423183\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20OUEN\x22,\x22id\x22\x3A\x224850\x22,\x22lati\x22\x3A\x2248.912188\x22,\x22long\x22\x3A\x222.333285\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SCEAUX\x22,\x22id\x22\x3A\x224819\x22,\x22lati\x22\x3A\x2248.778775\x22,\x22long\x22\x3A\x222.288772\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SEVRES\x22,\x22id\x22\x3A\x224820\x22,\x22lati\x22\x3A\x2248.824434\x22,\x22long\x22\x3A\x222.21308\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SURESNES\x22,\x22id\x22\x3A\x224821\x22,\x22lati\x22\x3A\x2248.87113\x22,\x22long\x22\x3A\x222.224667\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20THIAIS\x22,\x22id\x22\x3A\x224875\x22,\x22lati\x22\x3A\x2248.765315\x22,\x22long\x22\x3A\x222.388829\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VANVES\x22,\x22id\x22\x3A\x224822\x22,\x22lati\x22\x3A\x2248.821396\x22,\x22long\x22\x3A\x222.289619\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VELIZY\x20VILLACOUBLAY\x22,\x22id\x22\x3A\x224558\x22,\x22lati\x22\x3A\x2248.782531\x22,\x22long\x22\x3A\x222.191265\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VILLEJUIF\x22,\x22id\x22\x3A\x224876\x22,\x22lati\x22\x3A\x2248.794931\x22,\x22long\x22\x3A\x222.366248\x22\x7D,\x7B\x22name\x22\x3A\x22mairie\x20de\x20Villeneuve\x2Dla\x2DGarenne\x22,\x22id\x22\x3A\x223990\x22,\x22lati\x22\x3A\x2248.935596\x22,\x22long\x22\x3A\x222.332934\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VIROFLAY\x22,\x22id\x22\x3A\x224559\x22,\x22lati\x22\x3A\x2248.799422\x22,\x22long\x22\x3A\x222.172793\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VITRY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224878\x22,\x22lati\x22\x3A\x2248.788757\x22,\x22long\x22\x3A\x222.38929\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20LE\x20KREMLIN\x20BICETRE\x22,\x22id\x22\x3A\x225400\x22,\x22lati\x22\x3A\x2248.812652\x22,\x22long\x22\x3A\x222.356646\x22\x7D,\x7B\x22name\x22\x3A\x22Pr\x5Cu00e9fecture\x20de\x20Police\x20\x20\x2D\x20Site\x20de\x20Gesvres\x204\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224470\x22,\x22lati\x22\x3A\x2248.856894\x22,\x22long\x22\x3A\x222.348783\x22\x7D\x5D
I tried json_decode($myString) but it doesn't works
it works in javascript JSON.parse(...)
This is a JSON alright but in hex so converting from hex to string and should output to browser as JSON
<?php
header('Content-type: application/json');
function decode_code($code){
return preg_replace_callback(
"#\\\(x)?([0-9a-f]{2,3})#",
function($m){
return chr($m[1]?hexdec($m[2]):octdec($m[2]));
},
$code
);
}
echo (decode_code("\x5B\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20d\x27Asni\x5Cu00e8res\x20sur\x20Seine\x20Belfort\x22,\x22id\x22\x3A\x225337\x22,\x22lati\x22\x3A\x2248.907864\x22,\x22long\x22\x3A\x222.268167\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20d\x27Asni\x5Cu00e8res\x20sur\x20Seine\x20Les\x20Hauts\x20d\x27Asni\x5Cu00e8res\x22,\x22id\x22\x3A\x225338\x22,\x22lati\x22\x3A\x2248.925983\x22,\x22long\x22\x3A\x222.274256\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Bagneux\x20Port\x20Galand\x22,\x22id\x22\x3A\x225339\x22,\x22lati\x22\x3A\x2248.788372\x22,\x22long\x22\x3A\x222.317539\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Bois\x20Colombes\x20Les\x20Bruy\x5Cu00e8res\x22,\x22id\x22\x3A\x225340\x22,\x22lati\x22\x3A\x2248.908581\x22,\x22long\x22\x3A\x222.262088\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Colombes\x20Foss\x5Cu00e9\x20Jean\x22,\x22id\x22\x3A\x225342\x22,\x22lati\x22\x3A\x2248.93106\x22,\x22long\x22\x3A\x222.267059\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Colombes\x20Wiener\x22,\x22id\x22\x3A\x225343\x22,\x22lati\x22\x3A\x2248.915141\x22,\x22long\x22\x3A\x222.246733\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Courbevoie\x20\x2D\x20Quartier\x20de\x20B\x5Cu00e9con\x22,\x22id\x22\x3A\x225344\x22,\x22lati\x22\x3A\x2248.901328\x22,\x22long\x22\x3A\x222.265769\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Courbevoie\x20\x2D\x20Quartier\x20Faubourg\x20de\x20l\x27Arche\x22,\x22id\x22\x3A\x225345\x22,\x22lati\x22\x3A\x2248.897737\x22,\x22long\x22\x3A\x222.238265\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20Meudon\x20la\x20For\x5Cu00eat\x20Place\x20Centrale\x22,\x22id\x22\x3A\x225346\x22,\x22lati\x22\x3A\x2248.787749\x22,\x22long\x22\x3A\x222.227974\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2010\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224463\x22,\x22lati\x22\x3A\x2248.871982\x22,\x22long\x22\x3A\x222.357889\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2012\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224464\x22,\x22lati\x22\x3A\x2248.840246\x22,\x22long\x22\x3A\x222.388204\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2014\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224465\x22,\x22lati\x22\x3A\x2248.832864\x22,\x22long\x22\x3A\x222.326462\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2015\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224475\x22,\x22lati\x22\x3A\x2248.841647\x22,\x22long\x22\x3A\x222.299668\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2016\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224466\x22,\x22lati\x22\x3A\x2248.863973\x22,\x22long\x22\x3A\x222.277212\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2017\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224467\x22,\x22lati\x22\x3A\x2248.883034\x22,\x22long\x22\x3A\x222.32408\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2018\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224468\x22,\x22lati\x22\x3A\x2248.892666\x22,\x22long\x22\x3A\x222.337346\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2019\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224461\x22,\x22lati\x22\x3A\x2248.876334\x22,\x22long\x22\x3A\x222.39318\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2020\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224469\x22,\x22lati\x22\x3A\x2248.864976\x22,\x22long\x22\x3A\x222.39871\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x205\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224471\x22,\x22lati\x22\x3A\x2248.846319\x22,\x22long\x22\x3A\x222.344516\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x207\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224472\x22,\x22lati\x22\x3A\x2248.856888\x22,\x22long\x22\x3A\x222.319964\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x208\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224473\x22,\x22lati\x22\x3A\x2248.877862\x22,\x22long\x22\x3A\x222.317804\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x209\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224474\x22,\x22lati\x22\x3A\x2248.872497\x22,\x22long\x22\x3A\x222.340366\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20d\x27ALFORTVILLE\x22,\x22id\x22\x3A\x225392\x22,\x22lati\x22\x3A\x2248.80529\x22,\x22long\x22\x3A\x222.420021\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20d\x27ARCUEIL\x22,\x22id\x22\x3A\x225032\x22,\x22lati\x22\x3A\x2248.805973\x22,\x22long\x22\x3A\x222.336826\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20ASNIERES\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224799\x22,\x22lati\x22\x3A\x2248.910354\x22,\x22long\x22\x3A\x222.289417\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20AUBERVILLIERS\x22,\x22id\x22\x3A\x224825\x22,\x22lati\x22\x3A\x2248.914652\x22,\x22long\x22\x3A\x222.381673\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BAGNEUX\x22,\x22id\x22\x3A\x224800\x22,\x22lati\x22\x3A\x2248.798652\x22,\x22long\x22\x3A\x222.304296\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BAGNOLET\x22,\x22id\x22\x3A\x224827\x22,\x22lati\x22\x3A\x2248.868921\x22,\x22long\x22\x3A\x222.417979\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BOIS\x20COLOMBES\x22,\x22id\x22\x3A\x224824\x22,\x22lati\x22\x3A\x2248.914476\x22,\x22long\x22\x3A\x222.267797\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BOULOGNE\x20BILLANCOURT\x22,\x22id\x22\x3A\x224801\x22,\x22lati\x22\x3A\x2248.835388\x22,\x22long\x22\x3A\x222.24031\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CACHAN\x22,\x22id\x22\x3A\x224859\x22,\x22lati\x22\x3A\x2248.794443\x22,\x22long\x22\x3A\x222.331244\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHARENTON\x20LE\x20PONT\x22,\x22id\x22\x3A\x225395\x22,\x22lati\x22\x3A\x2248.819851\x22,\x22long\x22\x3A\x222.415667\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATENAY\x20MALABRY\x22,\x22id\x22\x3A\x224802\x22,\x22lati\x22\x3A\x2248.767087\x22,\x22long\x22\x3A\x222.277421\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATILLON\x22,\x22id\x22\x3A\x225382\x22,\x22lati\x22\x3A\x2248.799868\x22,\x22long\x22\x3A\x222.289823\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATOU\x22,\x22id\x22\x3A\x224531\x22,\x22lati\x22\x3A\x2248.890074\x22,\x22long\x22\x3A\x222.157537\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHOISY\x20LE\x20ROI\x22,\x22id\x22\x3A\x224861\x22,\x22lati\x22\x3A\x2248.762448\x22,\x22long\x22\x3A\x222.406938\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CLAMART\x22,\x22id\x22\x3A\x224803\x22,\x22lati\x22\x3A\x2248.800313\x22,\x22long\x22\x3A\x222.263162\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CLICHY\x22,\x22id\x22\x3A\x224804\x22,\x22lati\x22\x3A\x2248.902389\x22,\x22long\x22\x3A\x222.304312\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20COLOMBES\x22,\x22id\x22\x3A\x224805\x22,\x22lati\x22\x3A\x2248.92276\x22,\x22long\x22\x3A\x222.254343\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20COURBEVOIE\x22,\x22id\x22\x3A\x224806\x22,\x22lati\x22\x3A\x2248.895463\x22,\x22long\x22\x3A\x222.2565\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20DRANCY\x22,\x22id\x22\x3A\x224831\x22,\x22lati\x22\x3A\x2248.925691\x22,\x22long\x22\x3A\x222.389513\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20FRESNES\x22,\x22id\x22\x3A\x225398\x22,\x22lati\x22\x3A\x2248.75534\x22,\x22long\x22\x3A\x222.322471\x22\x7D,\x7B\x22name\x22\x3A\x22mairie\x20de\x20Garches\x22,\x22id\x22\x3A\x225287\x22,\x22lati\x22\x3A\x2248.843147\x22,\x22long\x22\x3A\x222.186586\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20GENNEVILLIERS\x22,\x22id\x22\x3A\x224807\x22,\x22lati\x22\x3A\x2248.925846\x22,\x22long\x22\x3A\x222.294367\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20HOUILLES\x22,\x22id\x22\x3A\x224535\x22,\x22lati\x22\x3A\x2248.923084\x22,\x22long\x22\x3A\x222.186666\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20ISSY\x20LES\x20MOULINEAUX\x22,\x22id\x22\x3A\x224808\x22,\x22lati\x22\x3A\x2248.82423\x22,\x22long\x22\x3A\x222.273643\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20IVRY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224864\x22,\x22lati\x22\x3A\x2248.807809\x22,\x22long\x22\x3A\x222.374647\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20L\x27HAY\x20LES\x20ROSES\x22,\x22id\x22\x3A\x224868\x22,\x22lati\x22\x3A\x2248.778867\x22,\x22long\x22\x3A\x222.337234\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LA\x20COURNEUVE\x22,\x22id\x22\x3A\x224835\x22,\x22lati\x22\x3A\x2248.926341\x22,\x22long\x22\x3A\x222.391157\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LA\x20GARENNE\x20COLOMBES\x22,\x22id\x22\x3A\x224809\x22,\x22lati\x22\x3A\x2248.906762\x22,\x22long\x22\x3A\x222.246125\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20BOURGET\x22,\x22id\x22\x3A\x224837\x22,\x22lati\x22\x3A\x2248.934871\x22,\x22long\x22\x3A\x222.425765\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20PLESSIS\x20ROBINSON\x22,\x22id\x22\x3A\x224823\x22,\x22lati\x22\x3A\x2248.78248\x22,\x22long\x22\x3A\x222.262036\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20PRE\x20SAINT\x20GERVAIS\x22,\x22id\x22\x3A\x224838\x22,\x22lati\x22\x3A\x2248.883069\x22,\x22long\x22\x3A\x222.403281\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LES\x20LILAS\x22,\x22id\x22\x3A\x224840\x22,\x22lati\x22\x3A\x2248.880519\x22,\x22long\x22\x3A\x222.41849\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LEVALLOIS\x22,\x22id\x22\x3A\x224810\x22,\x22lati\x22\x3A\x2248.893086\x22,\x22long\x22\x3A\x222.288514\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MALAKOFF\x22,\x22id\x22\x3A\x224811\x22,\x22lati\x22\x3A\x2248.820888\x22,\x22long\x22\x3A\x222.301668\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MEUDON\x22,\x22id\x22\x3A\x224812\x22,\x22lati\x22\x3A\x2248.812558\x22,\x22long\x22\x3A\x222.238593\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MONTROUGE\x22,\x22id\x22\x3A\x224813\x22,\x22lati\x22\x3A\x2248.818705\x22,\x22long\x22\x3A\x222.319896\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20NANTERRE\x22,\x22id\x22\x3A\x224814\x22,\x22lati\x22\x3A\x2248.892044\x22,\x22long\x22\x3A\x222.205266\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20NEUILLY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224815\x22,\x22lati\x22\x3A\x2248.885111\x22,\x22long\x22\x3A\x222.266186\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20PANTIN\x22,\x22id\x22\x3A\x224845\x22,\x22lati\x22\x3A\x2248.896479\x22,\x22long\x22\x3A\x222.401907\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20PUTEAUX\x22,\x22id\x22\x3A\x224816\x22,\x22lati\x22\x3A\x2248.8843\x22,\x22long\x22\x3A\x222.236835\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20RUEIL\x20MALMAISON\x22,\x22id\x22\x3A\x224817\x22,\x22lati\x22\x3A\x2248.877939\x22,\x22long\x22\x3A\x222.180679\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20CLOUD\x22,\x22id\x22\x3A\x224818\x22,\x22lati\x22\x3A\x2248.843706\x22,\x22long\x22\x3A\x222.219356\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x2DDENIS\x22,\x22id\x22\x3A\x224851\x22,\x22lati\x22\x3A\x2248.936005\x22,\x22long\x22\x3A\x222.358906\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20MANDE\x22,\x22id\x22\x3A\x225407\x22,\x22lati\x22\x3A\x2248.843501\x22,\x22long\x22\x3A\x222.419041\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20MAURICE\x22,\x22id\x22\x3A\x224873\x22,\x22lati\x22\x3A\x2248.818091\x22,\x22long\x22\x3A\x222.423183\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20OUEN\x22,\x22id\x22\x3A\x224850\x22,\x22lati\x22\x3A\x2248.912188\x22,\x22long\x22\x3A\x222.333285\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SCEAUX\x22,\x22id\x22\x3A\x224819\x22,\x22lati\x22\x3A\x2248.778775\x22,\x22long\x22\x3A\x222.288772\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SEVRES\x22,\x22id\x22\x3A\x224820\x22,\x22lati\x22\x3A\x2248.824434\x22,\x22long\x22\x3A\x222.21308\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SURESNES\x22,\x22id\x22\x3A\x224821\x22,\x22lati\x22\x3A\x2248.87113\x22,\x22long\x22\x3A\x222.224667\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20THIAIS\x22,\x22id\x22\x3A\x224875\x22,\x22lati\x22\x3A\x2248.765315\x22,\x22long\x22\x3A\x222.388829\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VANVES\x22,\x22id\x22\x3A\x224822\x22,\x22lati\x22\x3A\x2248.821396\x22,\x22long\x22\x3A\x222.289619\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VELIZY\x20VILLACOUBLAY\x22,\x22id\x22\x3A\x224558\x22,\x22lati\x22\x3A\x2248.782531\x22,\x22long\x22\x3A\x222.191265\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VILLEJUIF\x22,\x22id\x22\x3A\x224876\x22,\x22lati\x22\x3A\x2248.794931\x22,\x22long\x22\x3A\x222.366248\x22\x7D,\x7B\x22name\x22\x3A\x22mairie\x20de\x20Villeneuve\x2Dla\x2DGarenne\x22,\x22id\x22\x3A\x223990\x22,\x22lati\x22\x3A\x2248.935596\x22,\x22long\x22\x3A\x222.332934\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VIROFLAY\x22,\x22id\x22\x3A\x224559\x22,\x22lati\x22\x3A\x2248.799422\x22,\x22long\x22\x3A\x222.172793\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VITRY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224878\x22,\x22lati\x22\x3A\x2248.788757\x22,\x22long\x22\x3A\x222.38929\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20LE\x20KREMLIN\x20BICETRE\x22,\x22id\x22\x3A\x225400\x22,\x22lati\x22\x3A\x2248.812652\x22,\x22long\x22\x3A\x222.356646\x22\x7D,\x7B\x22name\x22\x3A\x22Pr\x5Cu00e9fecture\x20de\x20Police\x20\x20\x2D\x20Site\x20de\x20Gesvres\x204\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224470\x22,\x22lati\x22\x3A\x2248.856894\x22,\x22long\x22\x3A\x222.348783\x22\x7D\x5D"));
?>
Your json_encode is encoding unicode characters and they are being escaped. You can change this behaviour by passing the flag JSON_UNESCAPED_UNICODE as second parameter.
echo json_encode($array, JSON_UNESCAPED_UNICODE);
Make sure you're using double quotes:
<?php
$string = "\x5B\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20d\x27Asni\x5Cu00e8res\x20sur\x20Seine\x20Belfort\x22,\x22id\x22\x3A\x225337\x22,\x22lati\x22\x3A\x2248.907864\x22,\x22long\x22\x3A\x222.268167\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20d\x27Asni\x5Cu00e8res\x20sur\x20Seine\x20Les\x20Hauts\x20d\x27Asni\x5Cu00e8res\x22,\x22id\x22\x3A\x225338\x22,\x22lati\x22\x3A\x2248.925983\x22,\x22long\x22\x3A\x222.274256\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Bagneux\x20Port\x20Galand\x22,\x22id\x22\x3A\x225339\x22,\x22lati\x22\x3A\x2248.788372\x22,\x22long\x22\x3A\x222.317539\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Bois\x20Colombes\x20Les\x20Bruy\x5Cu00e8res\x22,\x22id\x22\x3A\x225340\x22,\x22lati\x22\x3A\x2248.908581\x22,\x22long\x22\x3A\x222.262088\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Colombes\x20Foss\x5Cu00e9\x20Jean\x22,\x22id\x22\x3A\x225342\x22,\x22lati\x22\x3A\x2248.93106\x22,\x22long\x22\x3A\x222.267059\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Colombes\x20Wiener\x22,\x22id\x22\x3A\x225343\x22,\x22lati\x22\x3A\x2248.915141\x22,\x22long\x22\x3A\x222.246733\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Courbevoie\x20\x2D\x20Quartier\x20de\x20B\x5Cu00e9con\x22,\x22id\x22\x3A\x225344\x22,\x22lati\x22\x3A\x2248.901328\x22,\x22long\x22\x3A\x222.265769\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20de\x20Courbevoie\x20\x2D\x20Quartier\x20Faubourg\x20de\x20l\x27Arche\x22,\x22id\x22\x3A\x225345\x22,\x22lati\x22\x3A\x2248.897737\x22,\x22long\x22\x3A\x222.238265\x22\x7D,\x7B\x22name\x22\x3A\x22Annexe\x20Mairie\x20Meudon\x20la\x20For\x5Cu00eat\x20Place\x20Centrale\x22,\x22id\x22\x3A\x225346\x22,\x22lati\x22\x3A\x2248.787749\x22,\x22long\x22\x3A\x222.227974\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2010\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224463\x22,\x22lati\x22\x3A\x2248.871982\x22,\x22long\x22\x3A\x222.357889\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2012\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224464\x22,\x22lati\x22\x3A\x2248.840246\x22,\x22long\x22\x3A\x222.388204\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2014\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224465\x22,\x22lati\x22\x3A\x2248.832864\x22,\x22long\x22\x3A\x222.326462\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2015\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224475\x22,\x22lati\x22\x3A\x2248.841647\x22,\x22long\x22\x3A\x222.299668\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2016\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224466\x22,\x22lati\x22\x3A\x2248.863973\x22,\x22long\x22\x3A\x222.277212\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2017\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224467\x22,\x22lati\x22\x3A\x2248.883034\x22,\x22long\x22\x3A\x222.32408\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2018\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224468\x22,\x22lati\x22\x3A\x2248.892666\x22,\x22long\x22\x3A\x222.337346\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2019\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224461\x22,\x22lati\x22\x3A\x2248.876334\x22,\x22long\x22\x3A\x222.39318\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x2020\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224469\x22,\x22lati\x22\x3A\x2248.864976\x22,\x22long\x22\x3A\x222.39871\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x205\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224471\x22,\x22lati\x22\x3A\x2248.846319\x22,\x22long\x22\x3A\x222.344516\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x207\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224472\x22,\x22lati\x22\x3A\x2248.856888\x22,\x22long\x22\x3A\x222.319964\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x208\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224473\x22,\x22lati\x22\x3A\x2248.877862\x22,\x22long\x22\x3A\x222.317804\x22\x7D,\x7B\x22name\x22\x3A\x22Antenne\x20de\x20Police\x209\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224474\x22,\x22lati\x22\x3A\x2248.872497\x22,\x22long\x22\x3A\x222.340366\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20d\x27ALFORTVILLE\x22,\x22id\x22\x3A\x225392\x22,\x22lati\x22\x3A\x2248.80529\x22,\x22long\x22\x3A\x222.420021\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20d\x27ARCUEIL\x22,\x22id\x22\x3A\x225032\x22,\x22lati\x22\x3A\x2248.805973\x22,\x22long\x22\x3A\x222.336826\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20ASNIERES\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224799\x22,\x22lati\x22\x3A\x2248.910354\x22,\x22long\x22\x3A\x222.289417\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20AUBERVILLIERS\x22,\x22id\x22\x3A\x224825\x22,\x22lati\x22\x3A\x2248.914652\x22,\x22long\x22\x3A\x222.381673\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BAGNEUX\x22,\x22id\x22\x3A\x224800\x22,\x22lati\x22\x3A\x2248.798652\x22,\x22long\x22\x3A\x222.304296\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BAGNOLET\x22,\x22id\x22\x3A\x224827\x22,\x22lati\x22\x3A\x2248.868921\x22,\x22long\x22\x3A\x222.417979\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BOIS\x20COLOMBES\x22,\x22id\x22\x3A\x224824\x22,\x22lati\x22\x3A\x2248.914476\x22,\x22long\x22\x3A\x222.267797\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20BOULOGNE\x20BILLANCOURT\x22,\x22id\x22\x3A\x224801\x22,\x22lati\x22\x3A\x2248.835388\x22,\x22long\x22\x3A\x222.24031\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CACHAN\x22,\x22id\x22\x3A\x224859\x22,\x22lati\x22\x3A\x2248.794443\x22,\x22long\x22\x3A\x222.331244\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHARENTON\x20LE\x20PONT\x22,\x22id\x22\x3A\x225395\x22,\x22lati\x22\x3A\x2248.819851\x22,\x22long\x22\x3A\x222.415667\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATENAY\x20MALABRY\x22,\x22id\x22\x3A\x224802\x22,\x22lati\x22\x3A\x2248.767087\x22,\x22long\x22\x3A\x222.277421\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATILLON\x22,\x22id\x22\x3A\x225382\x22,\x22lati\x22\x3A\x2248.799868\x22,\x22long\x22\x3A\x222.289823\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHATOU\x22,\x22id\x22\x3A\x224531\x22,\x22lati\x22\x3A\x2248.890074\x22,\x22long\x22\x3A\x222.157537\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CHOISY\x20LE\x20ROI\x22,\x22id\x22\x3A\x224861\x22,\x22lati\x22\x3A\x2248.762448\x22,\x22long\x22\x3A\x222.406938\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CLAMART\x22,\x22id\x22\x3A\x224803\x22,\x22lati\x22\x3A\x2248.800313\x22,\x22long\x22\x3A\x222.263162\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20CLICHY\x22,\x22id\x22\x3A\x224804\x22,\x22lati\x22\x3A\x2248.902389\x22,\x22long\x22\x3A\x222.304312\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20COLOMBES\x22,\x22id\x22\x3A\x224805\x22,\x22lati\x22\x3A\x2248.92276\x22,\x22long\x22\x3A\x222.254343\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20COURBEVOIE\x22,\x22id\x22\x3A\x224806\x22,\x22lati\x22\x3A\x2248.895463\x22,\x22long\x22\x3A\x222.2565\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20DRANCY\x22,\x22id\x22\x3A\x224831\x22,\x22lati\x22\x3A\x2248.925691\x22,\x22long\x22\x3A\x222.389513\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20FRESNES\x22,\x22id\x22\x3A\x225398\x22,\x22lati\x22\x3A\x2248.75534\x22,\x22long\x22\x3A\x222.322471\x22\x7D,\x7B\x22name\x22\x3A\x22mairie\x20de\x20Garches\x22,\x22id\x22\x3A\x225287\x22,\x22lati\x22\x3A\x2248.843147\x22,\x22long\x22\x3A\x222.186586\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20GENNEVILLIERS\x22,\x22id\x22\x3A\x224807\x22,\x22lati\x22\x3A\x2248.925846\x22,\x22long\x22\x3A\x222.294367\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20HOUILLES\x22,\x22id\x22\x3A\x224535\x22,\x22lati\x22\x3A\x2248.923084\x22,\x22long\x22\x3A\x222.186666\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20ISSY\x20LES\x20MOULINEAUX\x22,\x22id\x22\x3A\x224808\x22,\x22lati\x22\x3A\x2248.82423\x22,\x22long\x22\x3A\x222.273643\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20IVRY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224864\x22,\x22lati\x22\x3A\x2248.807809\x22,\x22long\x22\x3A\x222.374647\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20L\x27HAY\x20LES\x20ROSES\x22,\x22id\x22\x3A\x224868\x22,\x22lati\x22\x3A\x2248.778867\x22,\x22long\x22\x3A\x222.337234\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LA\x20COURNEUVE\x22,\x22id\x22\x3A\x224835\x22,\x22lati\x22\x3A\x2248.926341\x22,\x22long\x22\x3A\x222.391157\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LA\x20GARENNE\x20COLOMBES\x22,\x22id\x22\x3A\x224809\x22,\x22lati\x22\x3A\x2248.906762\x22,\x22long\x22\x3A\x222.246125\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20BOURGET\x22,\x22id\x22\x3A\x224837\x22,\x22lati\x22\x3A\x2248.934871\x22,\x22long\x22\x3A\x222.425765\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20PLESSIS\x20ROBINSON\x22,\x22id\x22\x3A\x224823\x22,\x22lati\x22\x3A\x2248.78248\x22,\x22long\x22\x3A\x222.262036\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LE\x20PRE\x20SAINT\x20GERVAIS\x22,\x22id\x22\x3A\x224838\x22,\x22lati\x22\x3A\x2248.883069\x22,\x22long\x22\x3A\x222.403281\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LES\x20LILAS\x22,\x22id\x22\x3A\x224840\x22,\x22lati\x22\x3A\x2248.880519\x22,\x22long\x22\x3A\x222.41849\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20LEVALLOIS\x22,\x22id\x22\x3A\x224810\x22,\x22lati\x22\x3A\x2248.893086\x22,\x22long\x22\x3A\x222.288514\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MALAKOFF\x22,\x22id\x22\x3A\x224811\x22,\x22lati\x22\x3A\x2248.820888\x22,\x22long\x22\x3A\x222.301668\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MEUDON\x22,\x22id\x22\x3A\x224812\x22,\x22lati\x22\x3A\x2248.812558\x22,\x22long\x22\x3A\x222.238593\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20MONTROUGE\x22,\x22id\x22\x3A\x224813\x22,\x22lati\x22\x3A\x2248.818705\x22,\x22long\x22\x3A\x222.319896\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20NANTERRE\x22,\x22id\x22\x3A\x224814\x22,\x22lati\x22\x3A\x2248.892044\x22,\x22long\x22\x3A\x222.205266\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20NEUILLY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224815\x22,\x22lati\x22\x3A\x2248.885111\x22,\x22long\x22\x3A\x222.266186\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20PANTIN\x22,\x22id\x22\x3A\x224845\x22,\x22lati\x22\x3A\x2248.896479\x22,\x22long\x22\x3A\x222.401907\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20PUTEAUX\x22,\x22id\x22\x3A\x224816\x22,\x22lati\x22\x3A\x2248.8843\x22,\x22long\x22\x3A\x222.236835\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20RUEIL\x20MALMAISON\x22,\x22id\x22\x3A\x224817\x22,\x22lati\x22\x3A\x2248.877939\x22,\x22long\x22\x3A\x222.180679\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20CLOUD\x22,\x22id\x22\x3A\x224818\x22,\x22lati\x22\x3A\x2248.843706\x22,\x22long\x22\x3A\x222.219356\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x2DDENIS\x22,\x22id\x22\x3A\x224851\x22,\x22lati\x22\x3A\x2248.936005\x22,\x22long\x22\x3A\x222.358906\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20MANDE\x22,\x22id\x22\x3A\x225407\x22,\x22lati\x22\x3A\x2248.843501\x22,\x22long\x22\x3A\x222.419041\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20MAURICE\x22,\x22id\x22\x3A\x224873\x22,\x22lati\x22\x3A\x2248.818091\x22,\x22long\x22\x3A\x222.423183\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SAINT\x20OUEN\x22,\x22id\x22\x3A\x224850\x22,\x22lati\x22\x3A\x2248.912188\x22,\x22long\x22\x3A\x222.333285\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SCEAUX\x22,\x22id\x22\x3A\x224819\x22,\x22lati\x22\x3A\x2248.778775\x22,\x22long\x22\x3A\x222.288772\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SEVRES\x22,\x22id\x22\x3A\x224820\x22,\x22lati\x22\x3A\x2248.824434\x22,\x22long\x22\x3A\x222.21308\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20SURESNES\x22,\x22id\x22\x3A\x224821\x22,\x22lati\x22\x3A\x2248.87113\x22,\x22long\x22\x3A\x222.224667\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20THIAIS\x22,\x22id\x22\x3A\x224875\x22,\x22lati\x22\x3A\x2248.765315\x22,\x22long\x22\x3A\x222.388829\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VANVES\x22,\x22id\x22\x3A\x224822\x22,\x22lati\x22\x3A\x2248.821396\x22,\x22long\x22\x3A\x222.289619\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VELIZY\x20VILLACOUBLAY\x22,\x22id\x22\x3A\x224558\x22,\x22lati\x22\x3A\x2248.782531\x22,\x22long\x22\x3A\x222.191265\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VILLEJUIF\x22,\x22id\x22\x3A\x224876\x22,\x22lati\x22\x3A\x2248.794931\x22,\x22long\x22\x3A\x222.366248\x22\x7D,\x7B\x22name\x22\x3A\x22mairie\x20de\x20Villeneuve\x2Dla\x2DGarenne\x22,\x22id\x22\x3A\x223990\x22,\x22lati\x22\x3A\x2248.935596\x22,\x22long\x22\x3A\x222.332934\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VIROFLAY\x22,\x22id\x22\x3A\x224559\x22,\x22lati\x22\x3A\x2248.799422\x22,\x22long\x22\x3A\x222.172793\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20de\x20VITRY\x20SUR\x20SEINE\x22,\x22id\x22\x3A\x224878\x22,\x22lati\x22\x3A\x2248.788757\x22,\x22long\x22\x3A\x222.38929\x22\x7D,\x7B\x22name\x22\x3A\x22Mairie\x20LE\x20KREMLIN\x20BICETRE\x22,\x22id\x22\x3A\x225400\x22,\x22lati\x22\x3A\x2248.812652\x22,\x22long\x22\x3A\x222.356646\x22\x7D,\x7B\x22name\x22\x3A\x22Pr\x5Cu00e9fecture\x20de\x20Police\x20\x20\x2D\x20Site\x20de\x20Gesvres\x204\x5Cu00e8me\x20arrondissement\x22,\x22id\x22\x3A\x224470\x22,\x22lati\x22\x3A\x2248.856894\x22,\x22long\x22\x3A\x222.348783\x22\x7D\x5D";
var_dump(json_decode($string,true));
The above code works OK for me. Good luck!!