Postgresql: How to get row type of a table as text?
There is no way to do this, since a type name is always an identifier, and only constants (literals) can be parameters.
The only resort is to use dynamic SQL like
EXECUTE format('json_populate_record(null::%I, $1)', 'schematable') USING json;