To create an empty JSON object I do usually use:
json_encode((object) null);
casting null to an object works, but is there any other prefer
I always do (Object)[];, like:
(Object)[];
$json = (Object)[]; // [] could also be array()
... play around with it in PHP ...
$json = json_encode($json);
... now it's real JSON ...