json: be a bit more relaxed on $minKey/$maxKey.
json: fix json comparison in tests.