mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Moved all build settings to `ArduinoJson/Configuration.hpp` Added AppVeyor settings in source tree
		
			
				
	
	
		
			28 lines
		
	
	
		
			616 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			616 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // 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
 | |
| 
 | |
| #include "Arduino/String.hpp"
 | |
| 
 | |
| namespace ArduinoJson {
 | |
| 
 | |
| // Represents a key in a JsonObject
 | |
| class JsonObjectKey {
 | |
|  public:
 | |
|   JsonObjectKey(const char* key) : _value(key), _needs_copy(false) {}
 | |
|   JsonObjectKey(const String& key) : _value(key.c_str()), _needs_copy(true) {}
 | |
| 
 | |
|   const char* c_str() const { return _value; }
 | |
|   bool needs_copy() const { return _needs_copy; }
 | |
| 
 | |
|  private:
 | |
|   const char* _value;
 | |
|   bool _needs_copy;
 | |
| };
 | |
| }
 |