Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Quotation marks in text strings

    Scheduled Pinned Locked Moved
    Local JSON
    2
    2
    270
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • eric_deanundefined
      eric_dean
      last edited by

      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?

      Jeffundefined 1 Reply Last reply Reply Quote 0
      • Jeffundefined
        Jeff @eric_dean
        last edited by

        @eric_dean

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post