   Serial.println(urlGet);
 
   http.begin(urlGet);
-  //http.addHeader("Content-Type", "application/json");
   http.addHeader("Accept", "application/json");
   http.setAuthorization(rexygenLogin,rexygenPassword);
   httpCode = http.GET(); // Returns http response code
 
   if (httpCode == 200) { // Check the returning code
     const size_t bufferSize = JSON_OBJECT_SIZE(1) + 30;
-    DynamicJsonBuffer jsonBuffer(bufferSize);
-    JsonObject& root = jsonBuffer.parseObject(http.getString());
-    v = root["v"].as<String>();
+    DynamicJsonDocument doc(bufferSize);
+    deserializeJson(doc, http.getString());
+    v = doc["v"].as<String>();
   }
   else{
     v = "null";

  Serial.println(urlGet);

  http.begin(urlGet);
  //http.addHeader("Content-Type", "application/json");
  http.addHeader("Accept", "application/json");
  http.setAuthorization(rexygenLogin,rexygenPassword);
  httpCode = http.GET(); // Returns http response code

  if (httpCode == 200) { // Check the returning code
    const size_t bufferSize = JSON_OBJECT_SIZE(1) + 30;
    DynamicJsonBuffer jsonBuffer(bufferSize);

    JsonObject& root = jsonBuffer.parseObject(http.getString());
    v = root["v"];
  }
  else{
    v = -1;

// Developed and tested with following boards/library versions:
//    esp8266 boards    2.5.0
//    ArduinoJson       6.10.0
//    ESP8266HTTPClient 1.1.0
//    ESP8266WiFi       1.0.0
#include <ESP8266WiFi.h>
