add optional prefix to allow diffing of nested docs