On Friday, February 14, 2020, Bryn Llewellyn <
bryn@yugabyte.com> wrote:
select jsonb_pretty(jsonb_object(
'{a, 17, b, "dog", c, true}'::varchar[]
))
In other words, do the double quotes around "dog" have no effect? That would be a bad thing—and it would limit the usefulness of the jsonb_object() function.
The double quotes serve a specific purpose, to allow values containing commas to be treated as a single value (see syntax details for the exact rules) in the resulting array of text values. The fact you don’t have to quote the other strings is a convenience behavior of the feature.
David J.