def get_encoder(encoding):
if encoding == Encoding.V1_THRIFT:<EOL><INDENT>return _V1ThriftEncoder()<EOL><DEDENT>if encoding == Encoding.V1_JSON:<EOL><INDENT>return _V1JSONEncoder()<EOL><DEDENT>if encoding == Encoding.V2_JSON:<EOL><INDENT>return _V2JSONEncoder()<EOL><DEDENT>if encoding == Encoding.V2_PROTO3:<EOL><INDENT>return _V2ProtobufEncoder()<EOL><DEDENT>raise ZipkinError('<STR_LIT>'.format(encoding))<EOL>
Creates encoder object for the given encoding.

    :param encoding: desired output encoding protocol.
    :type encoding: Encoding
    :return: corresponding IEncoder object
    :rtype: IEncoder