私は今、意志のために Mantle Framework を使用しています。これはシンプルで簡単です。しかし、現在、辞書の辞書を取得するときに問題に直面しています。それらを正しく解析できていません。
例えば :
{
LSE = {
name = LSE;
"stock_group_policies" = {
SET0 = {
definition = (
{
high = "0.9999";
low = 0;
tick = "0.0001";
},
{
high = "4.9995";
low = 1;
tick = "0.0005";
},
{
high = "9.999";
low = 5;
tick = "0.001";
},
{
high = "49.995";
low = 10;
tick = "0.005";
},
{
high = "99.99";
low = 50;
tick = "0.01";
},
{
high = "499.95";
low = 100;
tick = "0.05";
},
{
high = "999.9";
low = 500;
tick = "0.1";
},
{
high = "4999.5";
low = 1000;
tick = "0.5";
},
{
high = 9999;
low = 5000;
tick = 1;
},
{
high = "";
low = 10000;
tick = 5;
}
);
name = SET0;
type = increments;
};
SET1 = {
definition = (
{
high = "0.4999";
low = 0;
tick = "0.0001";
},
{
high = "0.9995";
low = "0.5";
tick = "0.0005";
},
{
high = "4.999";
low = 1;
tick = "0.001";
},
{
high = "9.995";
low = 5;
tick = "0.005";
},
{
high = "49.99";
low = 10;
tick = "0.01";
},
{
high = "99.95";
low = 50;
tick = "0.05";
},
{
high = "499.9";
low = 100;
tick = "0.1";
},
{
high = "999.5";
low = 500;
tick = "0.5";
},
{
high = 4999;
low = 1000;
tick = 1;
},
{
high = 9995;
low = 5000;
tick = 5;
},
{
high = "";
low = 10000;
tick = 10;
}
);
name = SET1;
type = increments;
};
};
};
NASDAQ = {
name = NASDAQ;
"stock_group_policies" = {
};
};
NYSE = {
name = NYSE;
"stock_group_policies" = {
};
};
default = {
name = default;
"stock_group_policies" = {
};
};
}
「SET0」「SET1」など、すべてのキーに「交換」の値を持つ1つの辞書で終わりたいと思います....
だから私はこれを使ってみました:
NSDictionary *exchanges = [MTLJSONAdapter modelOfClass:Exchange.class fromJSONDictionary:responseObject[@"exchanges"] error:&errorExchange];
しかし、そこで運を知ってください...