print out JSON document