2020-03-28 13:30:51 +01:00
|
|
|
#ifndef WLED_JSON_H
|
|
|
|
#define WLED_JSON_H
|
|
|
|
/*
|
|
|
|
* JSON API (De)serialization
|
|
|
|
*/
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include "ESPAsyncWebServer.h"
|
|
|
|
#include "src/dependencies/json/ArduinoJson-v6.h"
|
|
|
|
#include "src/dependencies/json/AsyncJson-v6.h"
|
|
|
|
#include "fx.h"
|
|
|
|
// TODO: AsynicWebServerRequest conflict?
|
|
|
|
|
|
|
|
void deserializeSegment(JsonObject elem, byte it);
|
|
|
|
bool deserializeState(JsonObject root);
|
|
|
|
void serializeSegment(JsonObject& root, WS2812FX::Segment& seg, byte id);
|
|
|
|
void serializeState(JsonObject root);
|
|
|
|
void serializeInfo(JsonObject root);
|
|
|
|
void serveJson(AsyncWebServerRequest* request);
|
|
|
|
void serveLiveLeds(AsyncWebServerRequest* request);
|
|
|
|
|
2020-03-25 09:00:55 +01:00
|
|
|
#endif //WLED_JSON_H
|