私は以下のようなJsonオブジェクトを持っています。属性でjsonプロパティを取得するC#
"log": {
"Response": [
{
"@type": "Authentication",
"Status": "True",
"Token": "cc622e9c-0d56-4774-8d79-543c525471b4"
},
{
"@type": "GetApplication",
"AppId": 100,
"Available": "True"
}]}
私はappIdプロパティにアクセスする必要があります。私はヌル参照エラーを与える以下のコードを試してみました。間違いを理解するのを助けてください。ここで
dynamic JsonText = JObject.Parse(result);
string AppId= JsonText ["log"]["Response @type='GetApplication'"]["AppId"].Tostring();
ありがとうございます...私にこれを試してみましょう – user3064309
@ user3064309助けがあれば正しいとマークすることができます。 – mybirthname
完了.......... :) – user3064309