Source/NFX/Serialization/BSON/RowConverter.cs
/// <summary>
/// Converts BSON document to JSON data map by directly mapping
///  BSON types into corresponding CLR types. The sub-documents get mapped into JSONDataObjects,
///   and BSON arrays get mapped into CLR object[]
/// </summary>
Converts BSON document to JSON data map by directly mapping
BSON types into corresponding CLR types. The sub-documents get mapped into JSONDataObjects,
and BSON arrays get mapped into CLR object[]
Converts BSON document to JSON data map by directly mapping BSON types into corresponding CLR types . The sub - documents get mapped into JSONDataObjects and BSON arrays get mapped into CLR object []
public virtual JSONDataMap BSONDocumentToJSONMap(BSONDocument doc, Func<BSONDocument, BSONElement, bool> filter = null)
        {
          if (doc==null) return null;
          var result = new JSONDataMap(true);
          foreach(var elm in doc)
          {
             if (filter!=null)
              if (!filter(doc, elm)) continue;
             var clrValue = DirectConvertBSONValue(elm, filter);
             result[elm.Name] = clrValue;
          }
          return result;
        }
public virtual JSONDataMap BSONDocumentToJSONMap ( BSONDocument doc , Func < BSONDocument , BSONElement , bool > filter = null ) { if ( doc == null ) return null ; var result = new JSONDataMap ( true ) ; foreach ( var elm in doc ) { if ( filter != null ) if ( ! filter ( doc , elm ) ) continue ; var clrValue = DirectConvertBSONValue ( elm , filter ) ; result [ elm . Name ] = clrValue ; } return result ; }
Converts BSON document to JSON data map by directly mapping
BSON types into corresponding CLR types.
Converts BSON document to JSON data map by directly mapping BSON types into corresponding CLR types .
doc
BSONDocument
filter
Func<BSONDocument, BSONElement, bool>