JsonDiff: factorize code a little more