How to assert/unit-test servers JSON response?

Posted by shazax on Stack Overflow See other posts from Stack Overflow or by shazax
Published on 2010-03-24T03:01:11Z Indexed on 2010/03/24 3:03 UTC
Read the original article Hit count: 275

My current project uses JSON as data interchange format. Both Front-end and Back-end team agree upon a JSON structure before start integrating a service. At times due to un-notified changes in JSON structure by back-end team; it breaks the front-end code.

Is there any external library that we could use to compare a mock JSON (fixture) with servers JSON response. Basically it should assert the whole JSON object and should throw an error if there is any violation in servers JSON format.

Additional info: App is built on JQuery consuming REST JSON services.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about JSON