JSON escape support

Howdy! I have a web request that I’d like to include prompted content in, but it needs to be a valid JSON string. This is kind of annoying, because it means that the input cannot use things like quotation marks. It’d be awesome if Yaak had a function built into it for escaping strings for the purpose of JSON.

Just to make sure the usage is obvious: I have a request that’s body is something like this:

{
  "field": "// contents go here"
}

I’d like it to just be

{
  "field": "${[ prompt.text() ]}"
}

But unfortunately it can’t be, because the prompt input could be invalid JSON. As an example, the text ”Hello world” is obvious invalid JSON.

Please authenticate to join the conversation.

Upvoters
Status

Needs Triage

Board

Feedback

Tags

Feature

Date

5 months ago

Author

Micah

Subscribe to post

Get notified by email when there are changes.