Support copying objects with null keys + support deep array concat + fix wrong hidden key index when concat'ting arrays#33
Support copying objects with null keys + support deep array concat + fix wrong hidden key index when concat'ting arrays#33nickdnk wants to merge 2 commits intoclugg:masterfrom nickdnk:master
null keys + support deep array concat + fix wrong hidden key index when concat'ting arrays#33Conversation
Support deep concat arrays Fix doc error Fix test for null key copy
|
This now also fixes the problem mentioned in #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 #35 easier to move forward with. I would recommend you don't release a new version until both PRs have been merged. |
null keysnull keys + support deep array concat + fix wrong hidden key index when concat'ting arrays
| Test_AssertEqual("merged 3 type", arr1.GetType(3), JSON_Type_Bool); | ||
| Test_AssertEqual("merged 3", arr1.GetBool(3), false); | ||
| Test_AssertTrue("merged 1 hidden", arr1.GetHidden(1)); | ||
| Test_AssertTrue("merged 3 hidden", arr1.GetHidden(3)); |
There was a problem hiding this comment.
Since the arrays are now not of equal length, this assertion would fail if I hadn't also fixed the hidden key index bug.
|
Hey mate, thanks for spotting these and thanks for your hard work. I'm not a fan of adding deep-copy support to As for the other fixes, they are now on the develop branch as per #34 (comment). |
|
Fixes included in v4.1.3, thanks again! |
Hello again
It would seem the library does not like it when you attempt to copy objects with
nullkeys 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.