Help needed for converting json 6 to 5

I am making a esp based web clock with a feature of news telling but rest of my codes part is in json 5 and the news part (which I got from web like the rest of json things) is in json 6 int httpCode = http.GET();

if (httpCode == 200) {

    Serial.println(httpCode);

    String payload = http.getString();
    
    const size_t capacity = JSON_ARRAY_SIZE(20) + 20*JSON_OBJECT_SIZE(2) + JSON_OBJECT_SIZE(3) + 20*JSON_OBJECT_SIZE(8) + 19020;
    
    DynamicJsonDocument doc(capacity);

    DeserializationError error = deserializeJson(doc, payload);
    
    if (error) {
       Serial.print(F("deserializeJson()error "));
       Serial.println(error.c_str());
       return;
       }

    JsonArray articles = doc["articles"];

    JsonObject articles_0 = articles[0];

    const char* articles_0_title = articles_0["title"];

    Serial.println(articles_0_title);
    }

this is the part can anyone convert it to json 5

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.