Neither parseObject() nor deserializeJson() working

Hello there, i am a mobile programmer but having some issue on my device’s codes, so had to dive in arduino aswell. I am getting a json from a http request, but can’t parse it at all, it fails everytime, was working on it since 1 week tried too many solutions but none of em worked so far.
Here is my code

void checkHostFromServer(String hostStr){

  String url = "http://"+host+"/Register/transmitter?hostStr=ESP_0EC076";
  Serial.println(url);
  http.begin(url);
  int httpCode = http.GET();
  Serial.println(httpCode);

  if(httpCode>0){

     Serial.printf("[HTTP] GET... code: %d\n", httpCode);

     if(httpCode == HTTP_CODE_OK){

      String payload = http.getString();

      Serial.println(payload);
      
//      const char* json = payload.c_str();
      char json[300];
      strcpy(json, payload.c_str());

      StaticJsonBuffer<200> jsonBuffer;

      JsonObject& root = jsonBuffer.parseObject(json);

      if (!root.success()) {
    Serial.println("parseObject() failed");
    
  }

incoming json is:

{
    "receiverHost": "DENEME123"
}

tried it with arduinoJson6 aswell by using deserializeJson.
Also when i write json manually like:

const char* json = "{\"transmitterHost\":\"ESP_0EC076\",\"pairingCode\":\"b9e886e2e7464d6889230e5ac62f4cdf\"}";

it works, thats weird.
any1 have any idea why it doesnt parse?

What arduino are you using? Your function eats a lot of memory.

My device is custom one, just adapter is arduino. Using ESP-12 as cpu. Adapter is nodemcu

The json object can return an error code in case there's an error. You may want to check that.

Error is Invalid Input but json is not wrong

any1?