Follow-up to #26612 (comment). As per #26506#pullrequestreview-1211984059, ParseNonRFCJSONValue()
is no longer necessary and we can use UniValue::read()
directly:
IIRC before that PR UniValue::read could only parse JSON object and array values, but now it will parse string/number/boolean/null values as well. laanwj pointed this out in #9028 (comment)
The implementation of ParseNonRFCJSONValue()
was already [simplified in #26612](https://github.com/bitcoin/bitcoin/pull/26612/files#diff-84c7a7f36362b9724c31e5dec9879b2f81eae0d0addbc9c0933c3558c577de65R259-R263) and test coverage updated to ensure behaviour didn’t change.
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()
.