As we don't store details of the original JSON type when using JsonAnySetter we can't choose the correct JSON type when handling empty PHP arrays. Perhaps any setter should allows an array of types to be passed in, to be returned by the any getter?