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 {
}
break;
case 'json':
if (is_array($json = json_decode($u))) {
$this->tableau = $json;
if (is_array($json = json_decode($u))
OR is_object($json)) {
$this->tableau = (array) $json;
$this->ok = true;
}
break;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter