<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div dir="ltr" ><div>Hi</div>
<div>&nbsp;</div>
<div>Trying to implement the JSONSerialization unimplemented method jsonObject(withStream).&nbsp;</div>
<div>&nbsp;</div>
<div><em>&nbsp;JSONSerialization.jsonObject(with stream: InputStream, options opt: ReadingOptions = []) throws -&gt; AnyObject</em></div>
<div>&nbsp;</div>
<div>The comments in the source code mentions that apart from stream configuration all other behaviour of this method is the same as the JSONObjectWithData:options:error.<br>This implies that I can internally reuse the JSONObjectWithData method, however its return type is ‘Any’ whereas the return type in jsonObjectWithStream is ‘AnyObject’. As I cannot downcast ‘Any’ to ‘AnyObject’, I’m looking for inputs if I should rewrite the behaviour or is there any other way?</div>
<div>&nbsp;</div>
<div>Thank you.</div>
<div>&nbsp;</div>
<div>-Mamatha.</div></div></div></div><BR>