BSON Implementations

Hi All,

Does anyone happen to have a BSON implementation they can share for net mf? I’m using JSON currently but am finding it VERY slow to parse on the Cobra so was thinking about exposing another media type from the service as BSON. Server side is easy to make the BSON, but cant find a BSON implementation for NetMf.

I’d like to try and avoid the time to port another implementation if possible - especially since i’m not sure how much better it will be yet.

Or has anyone else used another protocol that is more efficient at being parsed than XML or JSON?

I suppose the new G120 will also make the parsing faster - but a more binary oriented stream would be good for speed anyway.


In general, anything involving string manipulation will be memory-inefficient, because strings are immutable in C#, and new ones must be created all the time. A binary protocol would be ideal, but that’s a lot of work to create, if something simpler would suffice.

I’ve just uploaded an project of Bson implementation. It’s not perfect but good to your need I think.

Good luck!

Thank you so much @ Nickluo

Very much appreciated. I’ll give it a whirl hopefully tonight! I’ll do some parsing speed comparisons as well.