문제

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 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top