Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Titanium JSON Story

Titanium JSON Story

Titanium / Objective-C JSON, Object processing experiment

Ryutaro Miyashita

October 09, 2013
Tweet

More Decks by Ryutaro Miyashita

Other Decks in Programming

Transcript

  1. { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S",

    "GlossList": { "GlossEntry": { "ID": "SGML", "SortAs": "SGML" "GlossTerm": "St "Acronym": "SGML "Abbrev": "ISO 8 "GlossDef": { +40/ KTPOPSHFYBNQMFIUNM
  2. 5JUBOJVN΋͘΋͘ձ5PLZP JO0QFO/FUXPSL4QBDF for  (var  i  =  0;  i  <  1000;

     i++)  {    //  Method  Call  Bottleneck } ϝιουݺͼग़͠ͷϘτϧωοΫ
  3. 5JUBOJVN΋͘΋͘ձ5PLZP JO0QFO/FUXPSL4QBDF {        "1":  "abcde",    

       "2":  "abcde",        "3":  "abcde",        "4":  "abcde",        ...        "1000":  "abcde" } GPSJO +4 0CKFDUJWF$ 'BTU &OVNFSBUJPO ʷ
  4. 5JUBOJVN΋͘΋͘ձ5PLZP JO0QFO/FUXPSL4QBDF GPSJO +4 0CKFDUJWF$ 'BTU &OVNFSBUJPO for  (var  key

     in  obj)  {    if  (obj.hasOwnProperty(key))  {        obj[key];    } } -­‐(void)dictEnumerator:(id)args {    ENSURE_SINGLE_ARG(args,  NSDictionary);    for  (id  i  in  [args  keyEnumerator])  {        args[i];    } }