• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Guidelines on using NSJSONSerialization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guidelines on using NSJSONSerialization


  • Subject: Re: Guidelines on using NSJSONSerialization
  • From: Uli Kusterer <email@hidden>
  • Date: Sun, 22 Apr 2012 13:51:05 +0200

On 19.04.2012, at 19:39, Fritz Anderson wrote:
> This confuses me. MKMapView.annotations is an NSArray. How can an NSArray be nil-terminated? It has a count and there's no way to index into it that would return anything but an object. There's no need and no way to terminate it.
>
> (...) If, however, jAnnotations is an NSArray, the method should be able to detect that its contents are not of the supported type. The method shouldn't crash.

It could be a CFArrayRef. CFArrayRef can handle *any* kind of pointer for its values, if you give it the right callbacks, and it's toll-free-bridged to NSArray. Of course, if you try to get an object out of it and it actually contains something else (like a struct pointer), it'll still crash.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Guidelines on using NSJSONSerialization
      • From: Fritz Anderson <email@hidden>
References: 
 >Guidelines on using NSJSONSerialization (From: Alex Zavatone <email@hidden>)
 >Re: Guidelines on using NSJSONSerialization (From: Alex Zavatone <email@hidden>)
 >Re: Guidelines on using NSJSONSerialization (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: activating Delete menu item through binding
  • Next by Date: Re: NSDate value set in one method, vanishes when accessed from another
  • Previous by thread: Re: Guidelines on using NSJSONSerialization
  • Next by thread: Re: Guidelines on using NSJSONSerialization
  • Index(es):
    • Date
    • Thread