[Description]
could not determine data type for argument 1. since json_object_agg() is declared as taking type "any", the parser will not do any type conversion on unknown-type literals (that is, undecorated strings or NULLs). Such values will arrive here as type UNKNOWN, which fortunately does not matter to us, since unknownout() works fine.
[System Processing]
Processing will be aborted.
[Action]
To investigate the cause of the occurrence from the message, and remove cause.