WLED/wled00/json.h

21 lines
647 B
C
Raw Normal View History

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);
#endif //WLED_JSON_H