jsonファイルに複数のキーを追加するにはどうすればよいですか?JSON iPhoneにさらにキーを挿入する
NSArray *keys = [NSArray arrayWithArray:allkeys];
NSArray *objects = [NSArray arrayWithArray:allobjects];
NSDictionary *jsonDictionary = [NSDictionary dictionaryWithObjects:objects forKeys:keys];
上記のように、キーの前のjsonDictionaryはキーですが、内部にキーが多いキーが必要です。私は「forKeysを:キー、keys2」試してみました(keys2別の配列が、動作しません。今、これが結果です:。
{"text2":"Untitled {{400, 100}, {200, 100}} <UICFFont: 0x2c3960> font-family: \"Helvetica\"; font-weight: normal; font-style: normal; font-size: 12px","text3":"Untitled {{400, 100}, {200, 100}} <UICFFont: 0x2c3960> font-family: \"Helvetica\"; font-weight: normal; font-style: normal; font-size: 12px","text1":"Untitled {{400, 100}, {200, 100}} <UICFFont: 0x2c3960> font-family: \"Helvetica\"; font-weight: normal; font-style: normal; font-size: 12px"}
配列のキーは、テキスト1、テキスト2が含まれています...と配列オブジェクトは、無題、サイズが含まれています...しかし、私はすべて一緒に...内部の「テキスト書き込み」、「サイズ」とキー「テキスト1」にないたい
はこのようなものである場合があります。
{
"menu": {
"header": "xProgress SVG Viewer",
"items": [
{
"id": "Open"
},
事前に感謝ヘルプ