joerg(at)bec(dot)de writes:
> json_populate_record expects arrays in fields using the PG array literal
> syntax, it doesn't support JSON arrays. This is highly annoying as the JSON
> output functions like row_to_json will create JSON arrays, so round-trip
> fidelity is lost.
Yeah, this has come up before; one recent discussion is at
https://www.postgresql.org/message-id/flat/CAPpdape1SieipHCyZVbgtkb5NaD00FKGjiEoqfYj%3DPi%2B9ffisg%40mail.gmail.com
Basically, these functions weren't built to process nested structures
recursively, and making them do so is a bit more work than anyone has
seen fit to put into them yet. We'd accept a patch ...
regards, tom lane