Marc Weber wrote:
Eg this is what PHP is doing:
   $a = array();
   $a['dict'] =&  $a; // be careful and assign a reference. = would make a copy!
   echo json_encode($a);

   || Warning: json_encode(): recursion detected in /home/marc/test.php on line 
5
   || {"dict":{"dict":null}}

This isn't the kind of recursion I meant. In the world of type theory, a "recursive type" is a type defined in terms of itself. Lists are a recursive type family, and they are built into JSON. Various tree types are other examples with less clear JSON status.

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to