mercredi 18 novembre 2015

What is the best practice of testing JSON data?

I'm developing a server-side RESTful application which serves json data for its client applications. And I have to test so many various json outputs. Each json has many properties and their validation methods are different like below a sample json.

So such my use-case, do you know good libraries or web services to test json data flexibly?

{
  "system": { // data structure validation
    "time": 1234566, // data type validation
    "version": "0.0.1" // string matching validation
  },
  "app": { // data structure validation
    "id": "1234", // string matching validation
    "command": "do something", // string matching validation
    "data": { // data structure validation
      "hoge": "xxx", // data type validation
      "fuga": 123 // data type validation
    }
  }
}

Aucun commentaire:

Enregistrer un commentaire