sv764t | 8bf4998 | 2018-10-25 01:42:52 -0400 | [diff] [blame^] | 1 | *** Settings *** |
| 2 | Documentation This resource is filling out json string templates and returning the json back |
| 3 | Library RequestsLibrary |
| 4 | #Library StringTemplater |
| 5 | Library ../attlibs/StringTemplater.py |
| 6 | Library OperatingSystem |
| 7 | |
| 8 | *** Keywords *** |
| 9 | Fill JSON Template |
| 10 | [Documentation] Runs substitution on template to return a filled in json |
| 11 | [Arguments] ${json} ${arguments} |
| 12 | ${returned_string}= Template String ${json} ${arguments} |
| 13 | ${returned_json}= To Json ${returned_string} |
| 14 | [Return] ${returned_json} |
| 15 | |
| 16 | Fill JSON Template File |
| 17 | [Documentation] Runs substitution on template to return a filled in json |
| 18 | [Arguments] ${json_file} ${arguments} |
| 19 | ${json}= OperatingSystem.Get File ${json_file} |
| 20 | ${returned_json}= Fill JSON Template ${json} ${arguments} |
| 21 | [Return] ${returned_json} |