Skip to content

Conversation

jbohanon
Copy link

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 jbohanon force-pushed the allow-escaped-json branch from 78729b1 to 06f201a Compare July 20, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant