Refactored parse_json and parse_json_vector to utilize match statements