• Resolved jollygreen

    (@jollygreen)


    Do you know if FAQ JSON schema can be escaped to work on import? The format has many “{“, and I have been unsuccessful in attempts to escape the curly braces.

    Example FAQ Code:

    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [{
        "@type": "Question",
        "name": "questiontexthere",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answertexthere"
        }
      }, {
        "@type": "Question",
        "name": "questiontexthere",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answertexthere"
        }
      }, {
        "@type": "Question",
        "name": "questiontexthere",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answertexthere"
        }
      }, {
        "@type": "Question",
        "name": "questiontexthere",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answertexthere"
        }
      }, {
        "@type": "Question",
        "name": "questiontexthere",
        "acceptedAnswer": {
          "@type": "Answer",
          "text":"answertexthere"}
        }]
    }
    </script>
    

    Awesome plugin by the way! The Pro Version is totally worth it for anyone wondering!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @jollygreen,

    If you’re storing this data as-is in a CSV column, it should just work. If you need to paste it into the content area of the import, then you’d need to escape every bracket (that’s not related to an import element) with a backslash, e.g.:

    <script type="application/ld+json">
    \{
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": \[\{
        "@type": "Question",
        "name": "questiontexthere 1",
        "acceptedAnswer": \{
          "@type": "Answer",
          "text": "answertexthere 1"
        \}
      \}, \{
        "@type": "Question",
        "name": "questiontexthere 2",
        "acceptedAnswer": \{
          "@type": "Answer",
          "text": "answertexthere 2"
        \}
      \}, \{
        "@type": "Question",
        "name": "questiontexthere 3",
        "acceptedAnswer": \{
          "@type": "Answer",
          "text": "answertexthere 3"
        \}
      \}, \{
        "@type": "Question",
        "name": "questiontexthere 4",
        "acceptedAnswer": \{
          "@type": "Answer",
          "text": "answertexthere 4"
        \}
      \}, \{
        "@type": "Question",
        "name": "questiontexthere 5",
        "acceptedAnswer": \{
          "@type": "Answer",
          "text":"answertexthere 5"\}
        \}\]
    \}
    </script>
    Thread Starter jollygreen

    (@jollygreen)

    @wpallimport Thank you for the help! I was not escaping ‘]’ and that was causing the problem for me.

    This showcases the real power of WP All Import when applying FAQ ld+json schema to an import!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘FAQ Schema Import’ is closed to new replies.