JSON.parse pg output before sending to psm callback