format code
add json support