convert json to sql

Signed-off-by: Max Liao <maxliaops@gmail.com>