<?php $bad_json = '[{ "key": "value" }] [ [{ "key": "value", "obj": {} }, {} ] ] [{ "key": "value", "obj": {} }]'; $valid_json = "[" . preg_replace("~]\K(?=\s*\[)~", ",", $bad_json) . "]"; var_export(json_decode($valid_json, true));
You have javascript disabled. You will not be able to edit any code.