Add verification of digest before parsing JSON