开发者

string to JsonObject in C#

开发者 https://www.devze.com 2023-01-01 04:42 出处:网络
What is the best way to convert a (properly Json-formatted) String object into a System.Json.JsonObject?Right now I create a StringReader and use System.Json.JsonObject.Load.

What is the best way to convert a (properly Json-formatted) String object into a System.Json.JsonObject? Right now I create a StringReader and use System.Json.JsonObject.Load.

(This is really kind of academic, since I think I'll alw开发者_如何学编程ays be dealing with the raw Json in System.IO.Stream form.)


You could simply use the System.Json.JsonValue.Parse static method to parse a string directly rather than use a StringReader.

0

精彩评论

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