Does it make sense to decode the raw transaction in the wallet-rpc `gettransaction` call (or add an optional parameter to do so)?

See discussion in https://github.com/bitcoin/bitcoin/pull/15159#issuecomment-499051813
HelpExampleCli("getaddressesbylabel", "\"tabby\"")
            + HelpExampleRpc("getaddressesbylabel", "\"tabby\"")
                },
            }.Check(request);
    LOCK(pwallet->cs_wallet);
    std::string label = LabelFromValue(request.params[0]);
    
    UniValue ret(UniValue::VOBJ);
    std::set<std::string> addresses;
    for (const std::pair<const CTxDestination, CAddressBookData>& item : pwallet->mapAddressBook) {
        if (item.second.name == label) {
            std::string address = EncodeDestination(item.first);
            
            
            
            bool unique = addresses.emplace(address).second;
            assert(unique);
            
            
            
            
            ret.__pushKV(address, AddressBookDataToJSON(item.second, false));
        }
    }
    if (ret.empty()) {
        throw JSONRPCError(RPC_WALLET_INVALID_LABEL_NAME, std::string("No addresses with label " + label));
    }
    return ret;
}
static UniValue listlabels(const JSONRPCRequest& request)