String in JsonObject in C #

What is the best way to convert a (properly formatted Json) object Stringto System.Json.JsonObject? I am creating StringReaderand using right now System.Json.JsonObject.Load.

(This is truly academic, as I think I will always deal with raw Json in shape System.IO.Stream.)

+3
source share
1 answer

You can simply use the static method System.Json.JsonValue.Parseto parse the string directly, and not for use StringReader.

+4
source

Source: https://habr.com/ru/post/1747563/


All Articles