I went by the example from the docu which went fine:
select * from json_populate_record(null::x, '{"a":1,"b":2}')
But my self-constructed JSON simplified similar to this did not work :-(
-- p_some_num of type int
select * from json_populate_record( null:my_record_type, '{"a":'||p_some_num||'',"b":2}' )
resulting in:
ERROR: function json_populate_record(my_record_type, text) does not exist