Use options_to_json_dict API instead of having to get the json, decode it, and encode it again. (#1217)