(One thing I had to come up with was processing of arrays, which you also see in that example JSON -- it's the specifiers that have a colon inside the {}. The part after the colon is used as separator between the array elements, and each element is expanded separately.)
I'm splitting the subject line because it seems like two very different patches may come out of this.