Newtonsoft.json: This construct is deprecated. BSON reading and writing has been moved to its own package

Created on 7 Apr 2017  路  4Comments  路  Source: JamesNK/Newtonsoft.Json

I am using BsonWriter in my project and since update to 10.* I am getting this warning:
This construct is deprecated. BSON reading and writing has been moved to its own package. See https://www.nuget.org/packages/Newtonsoft.Json.Bson for more details.

I installed Newtonsoft.Json.Bson package but can't find the way to get rid on the warning. Any example would be appreciated. Thanks.

Most helpful comment

You need to use the new types equivalent to the old. E.g. instead of using the old BsonWriter use the new BsonDataWriter. (Perhaps the warnings should suggest the type in each case).

All 4 comments

You need to use the new types equivalent to the old. E.g. instead of using the old BsonWriter use the new BsonDataWriter. (Perhaps the warnings should suggest the type in each case).

Thanks, it worked. I think that changing warnings would be good idea to avoid these kind of issues as I had :)

Thanks!

Was this page helpful?
0 / 5 - 0 ratings