<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>Yes it sounds like the iOS sdk has gotten stricter parsing JSON. Assuming this is the OCM reference data being parsed nothing significant has changed there. </div><div><br></div><div>Connections Types will be an array of 20-30 connection type items (j1772 etc). The parent Json object will have entries for CountryList, ConnectionTypes, UsageTypes etc</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><div style="font-size:85%;color:#575757">Sent from my Samsung Galaxy smartphone.</div></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Geir Øyvind Vælidalo <geir@validalo.net> </div><div>Date: 14/12/2015 6:16 am (GMT+08:00) </div><div>To: ovmsdev@lists.teslaclub.hk </div><div>Subject: [Ovmsdev] Issue with Open Chargemap on iOS, newest Xcode and SDK </div><div><br></div></div>Hi guys,<div class=""><br class=""></div><div class="">I have problems with OCM when I compile with the newest Xcode and SDK. </div><div class="">The JSON-response from OCM looks fine, but the data-object containing the JSON-response might be different from the old SDK. Trying to fetch data from the JSON-object fails.</div><div class=""><br class=""></div><div class="">This is the first code that fails:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">- (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">void</span>)syncAction:(<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">NSDictionary</span> *)data {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="color: rgb(0, 0, 0);" class=""> ...<span class="Apple-tab-span" style="white-space:pre"> </span></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="color: rgb(0, 0, 0);" class=""> [</span><span style="color: rgb(187, 44, 162);" class="">self</span><span style="color: rgb(0, 0, 0);" class=""> </span><font color="#31595d" face="Menlo" class="">parseConnectionTypes</font><span style="color: rgb(0, 0, 0);" class="">:</span><span style="color: rgb(120, 73, 42);" class="">NULL_TO_NIL</span><span style="color: rgb(0, 0, 0);" class="">(data[</span>@"ConnectionTypes"<font face="Menlo" class="">])];</font></div></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Menlo; font-size: 11px;" class="">The watch tells me <i class="">data[</i></span><span style="color: rgb(209, 47, 27); font-family: Menlo; font-size: 11px;" class=""><i class="">@"ConnectionTypes</i></span><font face="Menlo" class=""><font color="#d12f1b" class=""><span style="font-size: 11px;" class=""><i class="">”</i></span></font><span style="font-size: 11px;" class=""><i class="">]</i> is an "invalid expression”, which is understandable since </span></font><span style="font-size: 11px; font-family: Menlo;" class=""><i class="">data</i> is an NSCFArray with 100 entries of NSCFDictionary, so <i class="">data</i> simply do not contain any keys. Shouldn't data have been a dictionary instead? </span></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Any ideas, guys?</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Regards,</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Geir</span></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div></body></html>