added json_type flag