Use case: a transaction which has several outputs to the same local wallet address. Currently listtransactions lists every transaction/address-of-output combination (if there are multiple addresses in local wallet, and a transaction has outputs that go to several of them) as a separate entry in it's JSON output. However, if there are several outputs to the same address, they are also printed as multiple entries in JSON, and therefore they lack information that could be used by the JSON client to reliably identify them. (They may differ in the amount, but may not.) The same problem exists in the output of gettransaction, even though it's easier to work around in the JSON client there since it will return all related outputs in the same output. The workaround is next to impossible in listtransactions, since it's output basically relies on how the rest of the transaction list looks. Being able to identify those entires apart is very needed there.
Proposal: The easiest way seems to be include output id (within the transaction) as a field on each output entry returned in JSON.
It would look something like: { "account" : "", "address" : "1ADDRESS8969349663986", "category" : "receive", ........ "amount" : 11.325, "outputindex": 5 }, This field (outputindex) could be used by the JSON client to identify these output entries, even if they have the same txid and target address.
The same change should be added in gettransaction.