AguaClara / aide_document-DEPRECATED

This module is no longer being maintained due to the transition to Onshape.
MIT License
0 stars 0 forks source link

Separate looping through json and reading json into different functions #6

Closed matanp closed 6 years ago

matanp commented 6 years ago

Create a function called read_json() that takes in a json key, and the full json string as an input. Outputs the string that will replace the latex variable.

For example: json_string = { "key1" : "10", "key2": { "value": 10, "units": "mg/L" } }

read_json("key1", json_string) will output 10 and read_json("key2", json_string) will output 10 mg/L

This allows developers to make improvements to which json structures are allowed separately from how the top level json is iterated through.