title: How to fix error 822 unexpected token at "json"?
body: <p>I have a VBA file that has been working for years with a POST to API function to create products on Shopify. It has suddenly and for non identified reason stopped working around April 15th 2019. It gives the following error:</p>
  
  <blockquote>
    <p>"error": "822: unexpected token at [my JSON string]</p>
  </blockquote>
  
  <p>This is what the JSON string looks like (you can find a more complete one at the end of this post): </p>
  
  <pre><code>{
    "product": {
      "title": "Lunettes",
      "body_html": "some long text",
      "vendor": "Tom Ford",
      "product_type": "lunettes enfant adolescents",
      "published": false,
      "tags": "some tags",
      "variants": [
        {
          "option1": "default title",
          "price": "199",
          "sku": "1",
          "weight_unit": "g"
        }
      ],
      "options": [
        {
          "name": "title",
          "position": 1,
          "values": [
            "default title"
          ]
        }
      ]
    }
  }
  </code></pre>
  
  <p>What I have already tried:</p>
  
  <ul>
  <li><p>check the URL with correct API key and token/password</p></li>
  <li><p>tried adding the latest released Shopify API version to the CURL : 2019-04</p></li>
  <li><p>check the syntax of the JSON string (comas, {, etc)</p></li>
  </ul>
  
  <p>Basically tried everything I knew. Please help if you have any clue.</p>
  
  <p>the more complete Json_String is :</p>
  
  <pre><code>{"product":{"title":"Lunettes TF5501 ","body_html":"TEXT,&lt;div style=\"text-align: center;\"&gt;&lt;img alt=\"Dimensions Lunettes Varionet TF5501 Argent\" src=\"https://cdn.shopify.com/s/files/1/0855/6878/files/Lunettes.png?15354686291941720795\" style=\"float: none; display: block; margin-left: auto; margin-right: auto;\" /&gt;&lt;/div&gt;&lt;div style=\"overflow-x: auto;\"&gt; &lt;table width=\"100%\"&gt; &lt;tbody&gt;&lt;tr style=\"background-color: #98ffaf;\"&gt;&lt;td style=\"text-align: center;\"&gt;140 mm&lt;/td&gt;&lt;td style=\"text-align: center;\"&gt;54 mm&lt;/td&gt;&lt;td style=\"text-align: center;\"&gt;38 mm&lt;/td&gt;&lt;td style=\"text-align: center;\"&gt;18 mm&lt;/td&gt;&lt;td style=\"text-align: center;\"&gt;145 mm&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;","vendor":"Brand","product_type":"lunettes anti lumière bleue","published":false,"tags":"meta-filter-Marque-Varionet,meta-filter-Forme-Rectangle,meta-filter-Genre-Unisex,meta-filter-Genre-Homme,meta-filter-Genre-Femme,meta-filter-Couleur-Argent","variants":[{"option1":"default title","price":"199","sku":"tom ford tf5501016","position":1,"grams":"100","inventory_policy":"deny","compare_at_price":"339","fulfillment_service":"logisticien-mavu","inventory_management":"shopify","option_1":"default title","requires_shipping":true,"taxable":true,"inventory_quantity":1,"weight_unit":"g"}],"options":[{"name":"title","position":1,"values":["default title"] }]
  }}
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>Youri</p>