def _read_params(input_file, json_body, p_params):
params = {}<EOL>try:<EOL><INDENT>if input_file:<EOL><INDENT>params.update(json.load(input_file))<EOL><DEDENT>if json_body is not None:<EOL><INDENT>params.update(json.loads(json_body))<EOL><DEDENT><DEDENT>except ValueError as e:<EOL><INDENT>raise ValueError("<STR_LIT>" % e)<EOL><DEDENT>try:<EOL><INDENT>params.update({p.split('<STR_LIT:=>', <NUM_LIT:1>)[<NUM_LIT:0>]: p.split('<STR_LIT:=>', <NUM_LIT:1>)[<NUM_LIT:1>] for p in p_params})<EOL><DEDENT>except IndexError:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return params<EOL>
Read parameters from input file, -j, and -p arguments, in that order.