Re: NSPredicate format strings: How to quote a space in a key path?
Re: NSPredicate format strings: How to quote a space in a key path?
- Subject: Re: NSPredicate format strings: How to quote a space in a key path?
- From: Ken Thomases <email@hidden>
- Date: Tue, 05 Aug 2014 17:08:33 -0500
On Aug 5, 2014, at 1:25 PM, Jens Alfke <email@hidden> wrote:
>
>> On Aug 5, 2014, at 10:38 AM, Sean McBride <email@hidden> wrote:
>>
>> "Keys must use ASCII encoding, begin with a lowercase letter, and may not contain whitespace."
>
> Well, that sucks. The iTunes library is just an example I'm working with, but in general I need to support arbitrary JSON data, so I have no control over what strings are being used for keys.
>
> At least this only seems to be a limitation of the format string parser. If I use @K, nonstandard keys work fine.
Have you tried formatting a key with a space in it into a format string with %K and then logging the resulting predicate? It should describe itself using properly formed predicate format string syntax.
Regards,
Ken
_______________________________________________
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