How to validate JSON sent to a HAP Controller

Hi


I am developping an application based on the HAP Non-Commercial spec, and I would like to validate the JSON that is sent by my app to the HAP Controller on IOS. Is there a tool or website that can do this?


From my point of view I have followed the spec to the letter, still, the Controller is nicely asking my app to remove the verified pairing because there seems to be a problem with the JSON returned after a GET to /accessories of my app. It drives me crazy because I fail to see where the JSON that I generate is troublesome (the JSON itself it validated, so it has to do with the contents itself)


Any help is appreciated


Thanks



Replies

Best to Google JSON Tester. These will verify that it is compliant, but won't tell you whether it meets the specs. It doesn't seem to take much to throw it off, for instance the one that got me was the sample accessory database in the spec document includes a null value in the Identify characteristic (type 14), which will cause the pairing to fail, and the only clue is that the accessory immediately request a Remove Pair after you think you've completed the pairing.