Test if the given JSON matches a certain structure.