[Lazarus] [fpc-pascal] Tests results of several pascal based JSON parsers
Michael Van Canneyt
michael at freepascal.org
Fri Aug 30 11:56:14 CEST 2019
On Fri, 30 Aug 2019, Anthony Walter via lazarus wrote:
> With regards to duplicate key names, some libraries allow for the same key
> to be parsed resulting in multiple child nodes of the same name. Others
> throw an exception when parsing an object with a duplicate key name.
>
> The correct way to handle duplicate keys is to overwrite the existing key
> when a duplicate is encountered.
There you go. I think the "correct way" is to raise an error;
not to override and thus inadvertently lose previous data.
I won't argue on who is correct, since it is a matter of opinion.
But this is a prime example of 'biased' tests.
You're testing an opinion, not actual functionality.
so IMHO it would be only fair to remove it from your comparison.
For speed & correctness, I repeat my request:
please provide your test code.
Michael.
More information about the lazarus
mailing list