0
bson, json, bsondocument에 객체를 직렬화하려고하면 스택 오버플로 예외가 발생합니다. 이 클래스는 외부 클래스에 대한 참조와 내부 클래스에 대한 외부 클래스 참조를 갖습니다. 이 문제를 해결하는 방법은 무엇입니까? 객체 그래프는 객체 체인 위아래로 많은 참조를 가지고 있습니까?MongoDB 객체 직렬화, 스택 오버플로 예외
BsonClassMap.RegisterClassMap<Document>();
BsonClassMap.RegisterClassMap<Section>();
Document _document = GetDocument();
BsonDocument _bsondocument1 = _document.ToBsonDocument();
string _hello4 = _documents[0].ToJson();
클래스 Section
는 Document
참조가 있고 Document
는 Sections
있다.
도움 주셔서 감사합니다.