You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Tucsonjhall <Jh...@cactusware.com> on 2018/01/12 21:44:36 UTC
JSON referencing MongoDB ObjectID
I'm working with a company that uses MongoDB and their specs for push JSON to
their endpoint includes an ObjectId("3023493820") whatever. I've done some
Googling put I'm still not sure how I would work in that mongo class object
using JSON.stringify. Any suggestions?
--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Re: JSON referencing MongoDB ObjectID
Posted by Olaf Krueger <ma...@olafkrueger.net>.
Hi,
IIRIC, the MongoDB ObjectId is typed as BSON.
To learn a bit more about the MongoDB ObjectId, maybe this is helpful
[1][2].
Even if it seems that it's not the case for you, maybe this [3] helps to
understand that "the _id doesn't necessarily have to be an ObjectID."
I found an AS3 implementation of BSON, but I never checked it out, so I
don't know if it works [4].
There are also some outdated MongoDB AS3 drivers out there [5][6][7][8],
maybe you could use parts of if. I guess [6][7][8] would be very helpful
because they proivide an ObjectId class!
Hope this helps,
Olaf
[1] https://docs.mongodb.com/manual/reference/method/ObjectId/
[2] https://docs.mongodb.com/manual/reference/bson-types/#objectid
[3] https://github.com/mongodb/mongo-php-library/issues/217
[4]
https://github.com/thejofr/as3-bson/blob/master/src/org/serialization/bson/BSON.as
[5] https://github.com/s9tpepper/MongoAS3
[6]
https://code.google.com/archive/p/jmcnet-full-mongo-flex-driver/wikis/ObjectID.wiki
[7] http://words.transmote.com/wp/20120402/mongodb-objectid-for-as3/
[8] https://gist.github.com/ericsoco/2287723
--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/