When there are illegal characters in properties names after dynamic-deserializing of a JSON in C# -
i trying deserialize json contains dash (-) characters in of properties names, using dynamic types:
string json = mywebclient.downloadstring("http://api.crossref.org/works/10.1093/brain/75.2.187"); dynamic result = jsonconvert.deserializeobject<dynamic>(json); string title = result.message.title[0]; string journal = result.message.container-title[0];
i cannot "container-title" value due use of illegal character. , don't want use "replace()" remove dash characters. there way?
since message
jobject
can access properties dictionary
result.message["container-title"]
Comments
Post a Comment