inja icon indicating copy to clipboard operation
inja copied to clipboard

Allow escaped json to survive rendering

Open jbohanon opened this issue 11 months ago • 0 comments

Add option to .dump() strings instead of .getstd::string().

this is useful in cases where the output of the rendered template is expected to be valid JSON. For example: Input:

{
  "foo": "\"bar\""
}

Template:

{
  "FOO": "{{ foo }}"
}

Output (without allowing escaped strings):

{
  "FOO": ""bar""
}

Output (allowing escaped strings):

{
  "FOO": "\"bar\""
}

jbohanon avatar Jul 19 '23 20:07 jbohanon