Fix SQL-JSON script