Page MenuHomePhabricator

RPC: Remove final comma for last entry of fixed-size Arrays and Objects in RPCResult

Authored by PiRK on Wed, Jan 13, 09:31.



JSON doesn't allow a trailing comma in Arrays/Objects

This is a backport of Core PR18444

Test Plan

Look at the help message for a command that return a JSON object, and verify that the last item in the output example does not have a trailing comma

src/bitcoin-cli help getblockstats

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

PiRK requested review of this revision.Wed, Jan 13, 09:31
Fabien requested changes to this revision.Wed, Jan 13, 10:58
Fabien added a subscriber: Fabien.
Fabien added inline comments.
655 ↗(On Diff #26898)

??? did you hit that mouse wheel button unexpectedly ?

This revision now requires changes to proceed.Wed, Jan 13, 10:58
655 ↗(On Diff #26898)

Git was completely unable to to locate the changed text and put the conflict in a random place. I must have missed a line when I deleted the conflict

remove accidental copy past or conflict left-over

This revision is now accepted and ready to land.Wed, Jan 13, 11:34