1

I have the following Json file:

{ 
  "id": "04d925a8-c62a-4c28-83eb-21bfb879583a",
  "timestamp": "2017-05-07T10:23:05.165Z",
  "lang": "en",
  "result": {
    "source": "agent",
    "resolvedQuery": "fever",
    "action": "d",
    "actionIncomplete": false,
    "parameters": {
      "Disease": [
        "influenza"
      ],
      "Interest": "",
      "Search": "",
      "sick": "",
      "Symptom": [
        "Headache",
        "Stomach ache",
        "fever"
      ],
      "Use": "No"
    },
    "contexts": [],
    "metadata": {
      "intentId": "49ebecd7-4efd-421b-868e-5a97637ef749",
      "webhookUsed": "false",
      "webhookForSlotFillingUsed": "false",
      "intentName": "Doctor"
    },
    "fulfillment": {
      "speech": "I think you possible have the influenza with symptoms Headache, Stomach ache and fever, influenza, Headache, Stomach ache and fever",
      "messages": [
        {
          "type": 0,
          "speech": "I think you possible have the influenza with symptoms Headache, Stomach ache and fever, influenza, Headache, Stomach ache and fever"
        },
        {
          "type": 4,
          "payload": {
            "Google": {
              "attachment": {
                "type": "",
                "payload": {}
              }
            },
            "kik": {
              "type": "",
              "body": ""
            },
            "slack": {
              "text": "",
              "attachments": []
            },
            "telegram": {
              "text": ""
            },
            "viber": {
              "type": "text",
              "text": ""
            }
          }
        }
      ]
    },
    "score": 1
  },
  "status": {
    "code": 200,
    "errorType": "success"
  },
  "sessionId": "ba024d91-b309-4fa7-919c-6780e77f57e5"
}

but when i do json_decode in php it gives me an empty array. This means the Json is properly formatted. So i checked my json on the JsonLint json validator website. And i got an SyntaxError: Bad string on line 1 this is the first curly brace of the json file. Why is this incorrect? or do i have other mistakes in my json? Because i cant seem to find the problem. Any help is greatly appreciated.

FutureCake
  • 2,614
  • 3
  • 27
  • 70

0 Answers0