HomePhabricator

refactor: rpc: Remove unnecessary uses of ParseNonRFCJSONValue() and rename it

Description

refactor: rpc: Remove unnecessary uses of ParseNonRFCJSONValue() and rename it

Summary:

ParseNonRFCJSONValue() is no longer necessary and we can use UniValue::read() directly

[...]

To avoid code duplication, we keep the function to throw on invalid input data but rename it to Parse() and remove it from the header.

The existing test coverage we had on ParseNonRFCJSONValue() is moved over to UniValue::read().

Backport of core#27256.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16294

Details

Provenance
stickies-v <stickies-v@protonmail.com>Authored on Mar 3 2023, 15:07
FabienCommitted on Thu, Jun 6, 10:29
FabienPushed on Thu, Jun 6, 10:29
Reviewer
Restricted Project
Differential Revision
D16294: refactor: rpc: Remove unnecessary uses of ParseNonRFCJSONValue() and rename it
Parents
rABC35b0f01b7a4b: refactor: RPC: pass named argument value as string_view
Branches
Unknown
Tags
Unknown