blob: b0572511a691ab23144219b37f271f72ca950352 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation This resource is filling out json string templates and returning the json back
3Library RequestsLibrary
4Library StringTemplater
5Library OperatingSystem
DR695Hccff30b2017-02-17 18:44:24 -05006
7*** Keywords ***
8Fill JSON Template
9 [Documentation] Runs substitution on template to return a filled in json
10 [Arguments] ${json} ${arguments}
11 ${returned_string}= Template String ${json} ${arguments}
12 ${returned_json}= To Json ${returned_string}
13 [Return] ${returned_json}
14
15Fill JSON Template File
16 [Documentation] Runs substitution on template to return a filled in json
17 [Arguments] ${json_file} ${arguments}
18 ${json}= OperatingSystem.Get File ${json_file}
19 ${returned_json}= Fill JSON Template ${json} ${arguments}
DR695Hb034c282018-02-23 18:33:19 -050020 [Return] ${returned_json}