I agree with the best effort type of conversion, and only being able to
handle JSON array's that conform to an SQL array. With that said I would
love to collaborate with you on this, but there is one thing holding me
back. The current company I work for (an insurance company) says it is a
conflict
t;title":"My
Title","short_desc":"My Short Desc","long_desc":"My Very Long
Desc","tags":["GAME","WII","PS4","ACTION","FIRST PERSON
SHOOTER"],"external_api_key":null}]'::JSON)
/**
ERROR: cannot call json_populate_recordset on a nested object
** Error **
ERROR: cannot call json_populate_recordset on a nested object
SQL state: 22023
*/
--Remove the tags part of the json and run again and things work as expected
SELECT * FROM json_populate_recordset(null::varrm.item, '[{"title":"My
Title","short_desc":"My Short Desc","long_desc":"My Very Long
Desc","external_api_key":null}]'::JSON)
Thanks
Adam Jelinek