I have to pass a json object to a function but it's not working:
import psycopg2
cur.execute(" SELECT mrp_sp_insert_jobdef( %s )",(json(_jobdef),) )
TypeError: 'module' object is not callable
Alternatively:
cur.execute(" SELECT mrp_sp_insert_jobdef( % )",(json.dumps(_jobdef),) )
ValueError: unsupported format character ' ' (0x20) at index 31