We tried to read pact from the json file directly in our use case but in order to make it work we had to modify existing library because there was no method in the existing library to match body by type instead of value when we were reading the contract from the json file directly. Here are the screenshot of code snippet where we have modified the exiting library to add matcher rule for the body.
It would be good if we can add a method to add matcher rule for the body as a feature.