I would expect that RawBSONDocument would maintain field ordering but it does not:
>>> from bson.raw_bson import RawBSONDocument >>> from bson import BSON, SON >>> raw_doc = RawBSONDocument(BSON.encode(SON([('_id', 0), ('a', 2), ('b', 3), ('c', 4)]))) >>> list(raw_doc) [u'a', u'c', u'_id', u'b']