mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			725 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			725 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
| * Arduino JSON library
 | |
| * Benoit Blanchon 2014 - MIT License
 | |
| */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include "JsonValue.h"
 | |
| 
 | |
| namespace ArduinoJson
 | |
| {
 | |
|     namespace Parser
 | |
|     {
 | |
|         // A JSON key-value pair, as a part of a JSON object
 | |
|         class JsonPair : JsonToken
 | |
|         {
 | |
|         public:
 | |
|             // Convert a JsonToken to a JsonPair
 | |
|             JsonPair(JsonToken token)
 | |
|                 : JsonToken(token)
 | |
|             {
 | |
|             }
 | |
| 
 | |
|             // Get the key
 | |
|             const char* key()
 | |
|             {
 | |
|                 return getText();
 | |
|             }
 | |
| 
 | |
|             // Get the value
 | |
|             JsonValue value()
 | |
|             {
 | |
|                 return nextSibling();
 | |
|             }
 | |
|         };
 | |
|     }
 | |
| } |