Fix comparison to the wrong length in test json_equal function