Add toJson functions
Write Document json to Dropbox