mirror of
				https://github.com/bblanchon/ArduinoJson.git
				synced 2025-11-04 00:21:36 +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();
 | 
						|
            }
 | 
						|
        };
 | 
						|
    }
 | 
						|
} |