the documentation on depth might also be incorrect, at least on php 5.3.3 I am seeing this error:
``Warning: json_encode() expects at most 2 parameters, 4 given in Command line code on line 1``