michel-kraemer/bson4jackson — Issue #12: ObjectID parsing should be big endian
Author: jroper
Created: 2011-12-08 14:57:06+00:00
State: open

According to the ObjectID spec, the time and counter fields of ObjectID should be stored big endian:

"Note that the timestamp and counter fields must be stored big endian unlike the rest of BSON."

from http://www.mongodb.org/display/DOCS/Object+IDs#ObjectIDs-BSONObjectIDSpecification

bson4jackson is decoding/encoding them using little endian. Additionally, machine/pid are not integers, they are arbitrary ids, so are actually byte arrays. Decoding them as little endian doesn't make sense. The MongoDB org.bson ObjectID treats the ObjectID as 3 big endian integers, I think this is a better way of treating things.