refactor json methods
add -F switch