Even if data is posted successfully, server responses ‘unexpected end of JSON input’

By Burak ULU

enter image description here

I’m trying to post a data to server by using React-Redux and I can post it with no problem. I mean, I can see the data that I posted, when I send a get request to server. But, even if I can post it, server returns unexpected end of JSON input and I don’t know why.

My JSON data looks like in code;

      var data = JSON.stringify({
        "capability": {
          "actuator": [
              "description": templateActDesc,
              "name": templateActName
          "metadata": templateMeta,
          "properties": [
              "name": templatePropName,
              "property": templateProp,
              "type": templatePropType,
              "unit": templatePropUnit
        "description": templateDesc,
        "deviceInfo": {
          "firmware": templateFirm,
          "hardware": templateHard,
          "info": templateInfo,
          "location" : templateLoc,
          "manufacturer": templateManu,
          "model": templateModel,
          "serialNumber": templateSerNum
        "id": templateId,
        "type": templateType

And the image of response;

Source: Stack Overflow


Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273