Page MenuHomePhabricator

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

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

Details

Summary

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

Event Timeline

PiRK requested review of this revision.Jan 13 2021, 09:31
Fabien requested changes to this revision.Jan 13 2021, 10:58
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/rpc/util.cpp
655

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

This revision now requires changes to proceed.Jan 13 2021, 10:58
src/rpc/util.cpp
655

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.Jan 13 2021, 11:34