开发者

Is there a way to generate c# code from serialized object in bson (file on a disk) to

开发者 https://www.devze.com 2023-03-08 19:36 出处:网络
What I have is a serialized object (given to me serialized from another language). I would like to generate c# code for this and use it in JSON.Net or similar. I have just started looking at JSON.Net

What I have is a serialized object (given to me serialized from another language). I would like to generate c# code for this and use it in JSON.Net or similar. I have just started looking at JSON.Net capabilities. However, thought it may be interesting to ask it here开发者_JS百科 in parallel.


I have found 2 great options:

json2csharp works well, which is a lightweight website giving .NET code that can be copy-pasted.

JsonCSharpClassGenerator is an executable that creates actual files in a subfolder of your choosing. So it's better for bulk .NET class generation from a large JSON string.


Based on the list here, there are several BSON implementations for C#:

http://bsonspec.org/#/implementation

One example is JSON.

0

精彩评论

暂无评论...
验证码 换一张
取 消