Closed nickdnk closed 1 year ago
This now also fixes the problem mentioned in https://github.com/clugg/sm-json/pull/35 about hidden key index being wrong on array concat and the minor doc error.
I also added support for (and tests) for deep concat'ing arrays. All tests in this PR (101 total) pass as of now and it is ready to be merged. This also makes https://github.com/clugg/sm-json/pull/35 easier to move forward with. I would recommend you don't release a new version until both PRs have been merged.
Hey mate, thanks for spotting these and thanks for your hard work. I'm not a fan of adding deep-copy support to Concat
, I feel that it blurs the intention a little bit - you could just do Concat(target.DeepCopy())
for the same outcome. What do you think?
As for the other fixes, they are now on the develop branch as per https://github.com/clugg/sm-json/issues/34#issuecomment-1483774832.
Hello again
It would seem the library does not like it when you attempt to copy objects with
null
keys in them. This happens:This PR should fix that, as far as I can tell. Let me know if I misunderstood anything here. I'm not 100% sure this is the best approach for it, but at least it works.
I wrote out a test for it "by hand", but I didn't run/compile it, because I don't have the tools handy for it (I only ever compile Get5 with Docker), so you better give it a go.