 // TODO: Change SSDP to get rid of local copies of ESP8266SSDP use the new scheme from the Arduino IDE instead
 // https://github.com/esp8266/Arduino/commit/f5ba04d46c0b6df75348f005e68411a856f89e48
 // can then get rid of the SSDP.update();
+
+// The following MUST be changed in aJSON.h, otherwise JSON will be cut off
+// #define PRINT_BUFFER_LEN 2048
 
 #include <ESP8266WiFi.h>
 #include <ESP8266WebServer.h>
 #include <WiFiUDP.h>
 #include "ESP8266SSDP.h"
 #include <NeoPixelBus.h> // NeoPixelAnimator branch
-#include <ArduinoJson.h>
+#include <aJSON.h> // Replace avm/pgmspace.h with pgmspace.h there
+
+
 
 #include "/secrets.h" // Delete this line and populate the following
 //const char* ssid = "********";


  if ( requestedUri.endsWith("/config") )
  {

    StaticJsonBuffer<1024> jsonBuffer;
    JsonObject& root = jsonBuffer.createObject();
    addConfigJson(root);

    root.prettyPrintTo(Serial);
    WiFiClient client = HTTP.client();
    root.prettyPrintTo((Print&)client); // Thanks me-no-dev for the "(Print&)"

  }

  else if ((requestedUri.startsWith("/api") and (requestedUri.lastIndexOf("/") == 4 )))
  {
    // Serial.println("Respond with complete json as in https://github.com/probonopd/ESP8266HueEmulator/wiki/Hue-API#get-all-information-about-the-bridge");

    StaticJsonBuffer<2048> jsonBuffer;
    JsonObject& root = jsonBuffer.createObject();
    JsonObject& groups = root.createNestedObject("groups");
    JsonObject& scenes = root.createNestedObject("scenes");
    JsonObject& config = root.createNestedObject("config");
    addConfigJson(config);
    JsonObject& lights = root.createNestedObject("lights");
    addLightJson(lights, 1); // I think this is prone to crashes; see https://github.com/bblanchon/ArduinoJson/issues/87
//    for (int i = 1; i < 2; i++)
//    {
//      addLightJson(root, i); // This crashes when i>1; see https://github.com/bblanchon/ArduinoJson/issues/87
//    }
    JsonObject& schedules = root.createNestedObject("schedules");
    root.prettyPrintTo(Serial);
    WiFiClient client = HTTP.client();
    root.prettyPrintTo((Print&)client); // Thanks me-no-dev for the "(Print&)"
  }

  else if (requestedUri.endsWith("/api"))

      animator.StartAnimation(numberOfTheLight, transitionTime, animUpdate);
    }

    aJsonObject *root;
    root = aJson.createObject();
    addLightJson(root, numberOfTheLight);
    sendJson(root);
  }

  else if (requestedUri == "/description.xml")
