zksecurity / noname

Noname: a programming language to write zkapps
https://zksecurity.github.io/noname/
179 stars 46 forks source link

chore(cli): read input json files and strings #111

Closed lognorman20 closed 3 months ago

lognorman20 commented 3 months ago

Closes #92. Allows user to pass either a JSON path or a JSON literal without a change to the current user frontend by expanding capabilities of the parse_inputs function

katat commented 3 months ago

Thanks.

I think we can add a new function, such as read_json_file, which does

  1. read the file content
  2. pass the content to the current function parse_inputs

Then update the command line logic to determine which function to call: either read_json_file or parse_inputs.

So instead of making a single function to accept two types of inputs, this may make the code clearer.

mimoo commented 3 months ago

ah, same as this one right? https://github.com/zksecurity/noname/pull/110 I guess we have to decide which approach to take now :D

mimoo commented 3 months ago

let's merge this one, it looks simple/clean enough and if it works then it's great to have that option!