Re: Checking if a string is valid JSON
Re: Checking if a string is valid JSON
- Subject: Re: Checking if a string is valid JSON
- From: Jens Alfke <email@hidden>
- Date: Mon, 29 Jan 2018 13:21:10 -0800
> On Jan 29, 2018, at 12:17 PM, Eric E. Dolecki <email@hidden> wrote:
>
> I am generating a String of JSON. Before I use it, I want to check to make
> sure that it's valid.
Is there a reason you need to generate the JSON by hand, instead of creating a
Dictionary or Array and letting NSJSONSerialization encode it for you?
If so, are you sure you're handling all the string-quoting and floating-point
encoding correctly?
—Jens
_______________________________________________
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