Nested Parsers & Unescaping


Great Parser!

I’m having trouble figuring out the following:

I have a JSON based document, which I can parse easily, in this document, some of the properties are strings that can contain either XML, Javascript, markdown and even VTL templates.

My problem is that these nested language are escaped in the strings. e.g.:

  "Markup":"<MyElement title=\"Hello\" />",
  "SomeValue":"console.log(\"Hello\");\nconsole.log(\"Hello Again\")"

Any recommendations on nesting existing parsers but somehow unescaping the input to the nested parser?

Many thanks


This doesn’t exist yet. I intend to implement something like this at some point (issue), but I’m not sure when I’ll get to that yet.