A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arduinojson.org/v5/api/jsonarray/measurelength/ below:

JsonArray::measureLength() | ArduinoJson 5

Description

Computes the length of the minified JSON document that JsonArray::printTo() produces, excluding the null-terminator.

This function is handy to fill the Content-Length header.

Signature
size_t measureLength() const
Return value

The number of characters that JsonArray::printTo() produces, excluding the null-terminator.

Example
// Send headers
client.println("Content-Type: application/json");
client.print("Content-Length: ");
client.println(root.measureLength());

// Terminate headers
client.println();

// Send body
root.printTo(client);
See also
  1. Home
  2. Version 5
  3. API
  4. JsonArray
  5. measureLength()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4