Replies: 1 comment 1 reply
-
The parse function (https://json.nlohmann.me/api/basic_json/parse/) can read from a lot of inputs, including iterator ranges. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an ESP32 with a webserver running. User sends some config in POST as JSON.
Now, these configs may(or may not) get quite long, so I would like to avoid copying the entire thing into a buffer and then parsing.
I guess I should make some kind of stream or iterator, which would feed characters into the parser, and then if internal buffer is empty, call a function to read some length of the request again. However I'm not sure how I can implement that, which
std
class to inherit from, etc.The function declaration is
int httpd_req_recv(httpd_req_t *r, char *buf, size_t buf_len)
.https://github.com/espressif/esp-idf/blob/master/components/esp_http_server/include/esp_http_server.h#L905
Beta Was this translation helpful? Give feedback.
All reactions