HomePhabricator

RPC client: Simplify command line string-to-JSON-value conversion code
e35b37b1b825Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

RPC client: Simplify command line string-to-JSON-value conversion code

By default, all command line parameters are converted into JSON string
values. There is no need to manually specify the incoming type.

A binary decision "parse as string or JSON?" is all that's necessary.

Convert to a simple class, initialized at runtime startup, which offers
a quick lookup to answer "parse as JSON?" conversion question.

Future parameter conversions need only to indicate the method name
and zero-based index of the parameter needing JSON parsing.

Details

Provenance
Jeff Garzik <jgarzik@bitpay.com>Authored on Jun 27 2014, 02:12
deadalnixPushed on May 14 2017, 22:04
Parents
rABC236ae8665efa: Merge pull request #3715
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff Garzik <jgarzik@bitpay.com> committed rABCe35b37b1b825: RPC client: Simplify command line string-to-JSON-value conversion code (authored by Jeff Garzik <jgarzik@bitpay.com>).Jun 27 2014, 02:18