rough start on a document (similar to ShareJS json api)