Added comments

This commit is contained in:
Benoit Blanchon
2014-09-01 21:36:09 +02:00
parent 763aa7fe37
commit 58c051f564
3 changed files with 21 additions and 1 deletions

View File

@ -13,16 +13,27 @@ namespace ArduinoJson
{
namespace Generator
{
// Contains methods to generate a JSON string.
// Implemented by both JsonObject and JsonArray
class JsonPrintable : public Printable
{
public:
// Generates the compact JSON string and sends it to a Print stream
virtual size_t printTo(Print& p) const = 0;
// Generates the compact JSON string and writes it in a buffer
size_t printTo(char* buffer, size_t bufferSize) const;
size_t prettyPrintTo(IndentedPrint& p) const;
// Generates the indented JSON string and sends it to a Print stream
size_t prettyPrintTo(Print& p) const;
// Generates the indented JSON string and sends it to a IndentedPrint stream
// This overload allows a finer control of the output because you can customize
// the IndentedPrint.
size_t prettyPrintTo(IndentedPrint& p) const;
// Generates the indented JSON string and writes it in a buffer
size_t prettyPrintTo(char* buffer, size_t bufferSize) const;
};
}