Skip to content
Extraits de code Groupes Projets
Valider d59c4690 rédigé par Fil's avatar Fil
Parcourir les fichiers

parfois json donne un object, on le cast en array ;

{{{
<BOUCLE_r7(DATA){datasource http://dbpedia.org/data/SPIP.json, json}>
<dt>#CLE</dt>
<dd> [(#VALEUR|var_export{1})] </dd>
</BOUCLE_r7>
}}}
parent 07151976
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -110,8 +110,9 @@ class IterateurDATA extends IterateurSPIP { ...@@ -110,8 +110,9 @@ class IterateurDATA extends IterateurSPIP {
} }
break; break;
case 'json': case 'json':
if (is_array($json = json_decode($u))) { if (is_array($json = json_decode($u))
$this->tableau = $json; OR is_object($json)) {
$this->tableau = (array) $json;
$this->ok = true; $this->ok = true;
} }
break; break;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter