Deserialize JSON with json.NET into C# dynamic -
i have following problem: have json file looks this
{ "path": { "firstpath": "/1/2/text()" } } if parse json-file newtonsoft this
dynamic dyn = jobject.parse(json); or this
dynamic dyn = jsonconvert.deserializeobject(json); i dynamic object needs used this
dyn.path.firstpath.value how can rid of value stuff? of objects in json end being string. don't want write ".value" @ end if not necessary.
i tested using newtonsoft 8.0.2 , works fine.
dynamic dyn = jobject.parse(json); string value = dyn.path.firstpath; value should equal /1/2/text().
Comments
Post a Comment