Skip to content

encode_max_depth

json.encode_max_depth(depth)

json.stringify() will generate an error when encoding deeply nested JSON once the maximum table depth has been exceeded. This check prevents unnecessarily complicated JSON from slowing down the application, or crashing the application due to lack of process stack space.