Github user jbapple-cloudera commented on a diff in the pull request: https://github.com/apache/thrift/pull/1222#discussion_r108061946 --- Diff: compiler/cpp/src/thrift/generate/t_json_generator.cc --- @@ -273,10 +273,14 @@ void t_json_generator::write_type_spec(t_type* ttype) { write_key_and_string("valueTypeId", get_type_name(vtype)); write_type_spec_object("keyType", ktype); write_type_spec_object("valueType", vtype); - } else if (ttype->is_list() || ttype->is_set()) { + } else if (ttype->is_list()) { t_type* etype = ((t_list*)ttype)->get_elem_type(); write_key_and_string("elemTypeId", get_type_name(etype)); write_type_spec_object("elemType", etype); + } else if (ttype->is_set()) { + t_type* etype = ((t_set*)ttype)->get_elem_type(); + write_key_and_string("elemTypeId", get_type_name(etype)); --- End diff -- Nit: these lines are duplicated from above. They can be refactored by setting etype in a conditional and putting 282 and 283 below that.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---