There are many example how work with mongo document Creating BSON object from JSON string
And other But I can not find how to create a document with a link (DBRef) to another
Something like this
private static final MessageFormat USER_DBREF = new MessageFormat("DBRef('organizationEntity', ObjectId('{}'))");
...
Document doc = Document.parse(json);
doc.put("organizationEntity", USER_DBREF.format(new Object[]{organizationEntity.getId()}));
doc.put("organization", new DBRef("organizationEntity", new ObjectId(organizationEntity.getId())));