606e7c991f
We use the .# key primarily as a hint that we have a list, but its value describes how many items the writer thinks were in the list. Since this information is redundant with the _actual_ data, it's potentially useful as a form of corrupted data detection but this function isn't equipped to actually report on such a problem (no error return value, and not in a good place for UI feedback anyway), so instead we'll largely ignore this value and just go by the number of items we encounter. The result of this is that when the counts mismatch we will go by the number of items actually holding the prefix, rather than panicking as we would've before. This fixes the crashes in #15300, #15135 and #15334, though it does not address any root-cause for the count to be incorrect in the first place, so there may be something to fix here somewhere else. |
||
---|---|---|
.. | ||
expand.go | ||
expand_test.go | ||
flatten.go | ||
flatten_test.go | ||
map.go | ||
map_test.go |