Postgresql Function Parse Json Schema