create make_json function.