RegEx

Mar 18, 2010 at 11:52 PM

Hi,

Can't find a sample/test where you can handle RegEx in Bson? You have it in the Reader but nothing in the writer. Same case as the Oid, which you now have implemented.

Can't you add WriteRegEx?

//Daniel

Mar 20, 2010 at 10:45 PM

If anyone is interested, I have just uploaded this patch.

//Daniel

Coordinator
Mar 23, 2010 at 2:18 AM

I'll add this feature at some point when I re-architect how BSON is being written. The current way is a bit of a hack to reuse the LINQ to JSON writer.

Mar 23, 2010 at 7:34 AM
Ok, and the providedpatch isn't something you could include even though you will rework it in the future?

//Daniel

Sent from my iPhone

23 mar 2010 kl. 02.18 skrev JamesNK <notifications@codeplex.com>:

From: JamesNK

I'll add this feature at some point when I re-architect how BSON is being written. The current way is a bit of a hack to reuse the LINQ to JSON writer.

Coordinator
Mar 24, 2010 at 4:46 AM

I'm going to update BSON writing quite soon. The end result will be exactly the same: a new WriteRegex method on BsonWriter :)

Mar 24, 2010 at 6:43 AM
Great! I'm looking forward to it. Will there by any more Bson features?

//Daniel

Sent from my iPhone

24 mar 2010 kl. 04.46 skrev JamesNK <notifications@codeplex.com>:

From: JamesNK

I'm going to update BSON writing quite soon. The end result will be exactly the same: a new WriteRegex method on BsonWriter :)

Coordinator
Mar 24, 2010 at 11:45 AM

I've done the initial check in. I haven't added writing regexs yet but that won't be too hard.

It will be faster, especially for larger documents.

Mar 24, 2010 at 12:44 PM

Hi,

will test this tonight. For me regex would of course be nice to have, since I then don't have to depend on my custom lib, so I'm looking forward to it.

//Daniel

Coordinator
Mar 27, 2010 at 8:44 AM

I've added WriteRegex and RegexConverter which will convert the built in .NET regular expression class to BSON/JSON.

Mar 27, 2010 at 7:44 PM

Hi,

Just tested it. Works great. Thanks!

//Daniel