• 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: Checking if a string is valid JSON
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Checking if a string is valid JSON (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: Checking if a string is valid JSON
  • Next by Date: Re: Checking if a string is valid JSON
  • Previous by thread: Re: Checking if a string is valid JSON
  • Index(es):
    • Date
    • Thread