Added getDataAsJson in Document.