Added RawJson() to insert pregenerated JSON portions (issue #259)

This commit is contained in:
Benoit Blanchon
2016-04-16 16:15:01 +02:00
parent c77c3f33ef
commit a6724bd03f
11 changed files with 131 additions and 130 deletions

View File

@@ -0,0 +1,21 @@
// Copyright Benoit Blanchon 2014-2016
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
// If you like this project, please add a star!
#pragma once
namespace ArduinoJson {
// A special type of data that can be used to insert pregenerated JSON portions.
class RawJson {
public:
explicit RawJson(const char* str) : _str(str) {}
operator const char*() const { return _str; }
private:
const char* _str;
};
}