json + sql issue fixed