json::document will output null for an empty document.