I'm trying to output a JSON array from a snippet call on a resource, that is setup as json/inline
$arr = $modx->getCollection('className');
return $modx->toJSON($arr);
But i get this weird response repeated;
<b>Warning</b>: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected in <b>/home/site/core/xpdo/xpdo.class.php</b> on line <b>2327</b>
If I run through the array in a foreach loop like this;
foreach($arr as $key)
{
echo $key->get('value');
}
Every value gets outputed.
What am I missing.
//Moonkin