You're having a laugh, Alan?

Basically you're saying - to have robust code - we should actually not use 
isJson() because it's neither use nor ornament, instead you're advocating 
this instead:

try {
foo = deserializeJson(bar);
} catch(any e){
 // if only I could have reliably verified it was JSON first.
}

That's rather disappointing.

It should me *my* call if I want the overhead of checking the JSON twice so 
my code is robust, not yours. You should be focusing on making your work do 
what it says on the tin, and let me worry about how I use it.

-- 
Adam




On Thursday, 4 April 2013 22:03:10 UTC+13, Alan Williamson wrote:
>
> This is known and our documentation clearly states that this is not a 
> true exhaustive test: 
>
> http://openbd.org/manual/?/function/isjson 
>
> For performance reasons we take a "guess-estimate" as to whether or not 
> the string looks like JSon.   We don't want to do a complete conversion 
> just so someone can then do a complete conversion again. 
>
>
> On 02/04/2013 03:32, Adam Cameron wrote: 
> > The first instance says "true" to the isJson() call, but then errors 
> > on the deserializeJson() call. isJson() is incorrect here: the string 
> > is not valid JSON. 
> > 
>
>

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to