forked from bblanchon/ArduinoJson
Changed ::String
to ArduinoJson::String
(issue #275)
This commit is contained in:
@ -1,6 +1,12 @@
|
|||||||
ArduinoJson: change log
|
ArduinoJson: change log
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
|
HEAD
|
||||||
|
----
|
||||||
|
|
||||||
|
* Changed `::String` to `ArduinoJson::String` (issue #275)
|
||||||
|
* Changed `::Print` to `ArduinoJson::Print` too
|
||||||
|
|
||||||
v5.3.0
|
v5.3.0
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
#define ARDUINOJSON_USE_INT64 0
|
#define ARDUINOJSON_USE_INT64 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// arduino has its own implementation of String to replace std::string
|
||||||
|
#ifndef ARDUINOJSON_USE_ARDUINO_STRING
|
||||||
|
#define ARDUINOJSON_USE_ARDUINO_STRING 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// arduino doesn't support STL stream
|
// arduino doesn't support STL stream
|
||||||
#ifndef ARDUINOJSON_ENABLE_STD_STREAM
|
#ifndef ARDUINOJSON_ENABLE_STD_STREAM
|
||||||
#define ARDUINOJSON_ENABLE_STD_STREAM 0
|
#define ARDUINOJSON_ENABLE_STD_STREAM 0
|
||||||
@ -62,6 +67,11 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// on a computer, we can use std::string
|
||||||
|
#ifndef ARDUINOJSON_USE_ARDUINO_STRING
|
||||||
|
#define ARDUINOJSON_USE_ARDUINO_STRING 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// on a computer, we can assume that the STL is there
|
// on a computer, we can assume that the STL is there
|
||||||
#ifndef ARDUINOJSON_ENABLE_STD_STREAM
|
#ifndef ARDUINOJSON_ENABLE_STD_STREAM
|
||||||
#define ARDUINOJSON_ENABLE_STD_STREAM 1
|
#define ARDUINOJSON_ENABLE_STD_STREAM 1
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Arduino/Print.hpp"
|
#include "../Print.hpp"
|
||||||
|
|
||||||
namespace ArduinoJson {
|
namespace ArduinoJson {
|
||||||
namespace Internals {
|
namespace Internals {
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Arduino/Print.hpp"
|
#include "../Print.hpp"
|
||||||
#include "../Arduino/String.hpp"
|
#include "../String.hpp"
|
||||||
|
|
||||||
namespace ArduinoJson {
|
namespace ArduinoJson {
|
||||||
namespace Internals {
|
namespace Internals {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Arduino/Print.hpp"
|
#include "../Print.hpp"
|
||||||
|
|
||||||
namespace ArduinoJson {
|
namespace ArduinoJson {
|
||||||
namespace Internals {
|
namespace Internals {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Arduino/Print.hpp"
|
#include "../Print.hpp"
|
||||||
|
|
||||||
namespace ArduinoJson {
|
namespace ArduinoJson {
|
||||||
namespace Internals {
|
namespace Internals {
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Arduino/Print.hpp"
|
|
||||||
#include "../Polyfills/isNaN.hpp"
|
|
||||||
#include "../Polyfills/isInfinity.hpp"
|
#include "../Polyfills/isInfinity.hpp"
|
||||||
|
#include "../Polyfills/isNaN.hpp"
|
||||||
#include "../Polyfills/normalize.hpp"
|
#include "../Polyfills/normalize.hpp"
|
||||||
|
#include "../Print.hpp"
|
||||||
#include "Encoding.hpp"
|
#include "Encoding.hpp"
|
||||||
#include "ForceInline.hpp"
|
#include "ForceInline.hpp"
|
||||||
#include "JsonFloat.hpp"
|
#include "JsonFloat.hpp"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Arduino/Print.hpp"
|
#include "../Print.hpp"
|
||||||
|
|
||||||
namespace ArduinoJson {
|
namespace ArduinoJson {
|
||||||
namespace Internals {
|
namespace Internals {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#if ARDUINOJSON_ENABLE_STD_STREAM
|
#if ARDUINOJSON_ENABLE_STD_STREAM
|
||||||
|
|
||||||
#include "../Arduino/Print.hpp"
|
#include "../Print.hpp"
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <stdint.h> // for uint8_t
|
#include <stdint.h> // for uint8_t
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "Arduino/String.hpp"
|
#include "String.hpp"
|
||||||
#include "JsonVariant.hpp"
|
#include "JsonVariant.hpp"
|
||||||
|
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Arduino/String.hpp"
|
#include "String.hpp"
|
||||||
#include "Internals/JsonBufferAllocated.hpp"
|
#include "Internals/JsonBufferAllocated.hpp"
|
||||||
#include "Internals/JsonPrintable.hpp"
|
#include "Internals/JsonPrintable.hpp"
|
||||||
#include "Internals/List.hpp"
|
#include "Internals/List.hpp"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Arduino/String.hpp"
|
#include "String.hpp"
|
||||||
|
|
||||||
namespace ArduinoJson {
|
namespace ArduinoJson {
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace ArduinoJson {
|
||||||
// This class reproduces Arduino's Print class
|
// This class reproduces Arduino's Print class
|
||||||
class Print {
|
class Print {
|
||||||
public:
|
public:
|
||||||
@ -29,6 +30,7 @@ class Print {
|
|||||||
|
|
||||||
size_t println() { return write('\r') + write('\n'); }
|
size_t println() { return write('\r') + write('\n'); }
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
@ -7,13 +7,18 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef ARDUINO
|
#include "Configuration.hpp"
|
||||||
|
|
||||||
#include <string>
|
#if ARDUINOJSON_USE_ARDUINO_STRING
|
||||||
typedef std::string String;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include <WString.h>
|
#include <WString.h>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace ArduinoJson {
|
||||||
|
typedef std::string String;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -5,8 +5,8 @@
|
|||||||
// https://github.com/bblanchon/ArduinoJson
|
// https://github.com/bblanchon/ArduinoJson
|
||||||
// If you like this project, please add a star!
|
// If you like this project, please add a star!
|
||||||
|
|
||||||
|
#include <ArduinoJson.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <ArduinoJson/Internals/StaticStringBuilder.hpp>
|
|
||||||
|
|
||||||
using namespace ArduinoJson::Internals;
|
using namespace ArduinoJson::Internals;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user