Quotation marks in text strings
-
I’m using local JSON-formatted text files as data sources, which was working brilliantly until someone included a set of quotation marks in a text string, which stopped Templater dead in its tracks. Did some googling after I isolated the problem, and see that I’m up against a need to escape from those quotation marks…but without any coding background, I can’t figure out what the text file ought to look like to make this work. Is there an easy fix I’m missing?
-
Great question! Escaping the quotation marks should be as easy as putting a backslash before the quotes in the text block of our JSON file. So, for example, if we wanted something like this:
Lorem ipsum "dolor" sit amet
we’d write it like this:
Lorem ipsum \"dolor\" sit amet
The backslashes should be read as an “escape” to keep the quotation marks in the text from interfering with the formatting of the JSON data file.
Hopefully, that should be all we need, but if you have any other questions, please feel free to reach out.
Thanks,
Jeff