I can send a PR for this: * introduce an internal error type with enum variants for invalid JSON * also an error variant for the failed diff