docs: public String toJson() {
        try {
           Resource stringResource = Resources.fromString();
           write(stringResource);
           return stringResource.readToString().trim();
        } catch (IOException e) {
           throw Throwables.propagate(e);
        }
     }