Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Validating a JSON structure

by rpnoble419 (Pilgrim)
on Sep 04, 2012 at 22:41 UTC ( #991696=note: print w/ replies, xml ) Need Help??


in reply to Validating a JSON structure

What are you testing for?

Are you testing to see if the JSON object is valid?

Are you testing to see if certain data elements are present?

Does the JSON object you are looking for have to match exactly a given construct?

Each case in the above requires a different method to test for...


Comment on Re: Validating a JSON structure
Re^2: Validating a JSON structure
by sherab (Scribe) on Sep 05, 2012 at 13:13 UTC
    Well formed JSON testing is easy enough to check for (Test::JSON, thanks Poe!) but what I am after is if the JSON matches a very strict definition.
    - Lack of elements, fail
    - Additional elements, fail

    If the test doesn't pass then we can put some eyeballs on it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991696]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-12-19 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls