Closed vsigler closed 1 year ago
I get bug reports for code that I did not write, or for obsolete code that was put on npm by someone else decades ago and not kept up to date. When you bitched about a file in a language that I do not use, I had to assume it was one of those.
I accepted an unsolicited pull request seven months ago that introduced your bug. I have reverted to the previous edition, five years old.
I hope that you are happy too.
Thanks and no worries, I have never maintained anything public (or not for long anyway). I understand that after a while, one gets their shields up.
To correct https://github.com/douglascrockford/JSON-js/issues/135, this time submitting with the correct file names in the stacktrace to make everyone involved happy. :)
Not sure if it is not intentional, but the cyclic structure detection seems to be too simplified. Instead of checking only within the same stack, it throws an error even when there is the same object used anywhere within the object structure. See the following example:
Produces:
The object is prefectly fine to be serialized into json and has no cyclic structures. I would say the detection should only consider actual stack as it is traversing the serialized object.