mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			804 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			804 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // Copyright Benoit Blanchon 2014-2017
 | |
| // MIT License
 | |
| //
 | |
| // Arduino JSON library
 | |
| // https://github.com/bblanchon/ArduinoJson
 | |
| // If you like this project, please add a star!
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| namespace ArduinoJson {
 | |
| namespace Internals {
 | |
| 
 | |
| // A metafunction that returns the type of the value returned by
 | |
| // JsonVariant::as<T>()
 | |
| template <typename T>
 | |
| struct JsonVariantAs {
 | |
|   typedef T type;
 | |
| };
 | |
| 
 | |
| template <>
 | |
| struct JsonVariantAs<char*> {
 | |
|   typedef const char* type;
 | |
| };
 | |
| 
 | |
| template <>
 | |
| struct JsonVariantAs<JsonArray> {
 | |
|   typedef JsonArray& type;
 | |
| };
 | |
| 
 | |
| template <>
 | |
| struct JsonVariantAs<const JsonArray> {
 | |
|   typedef const JsonArray& type;
 | |
| };
 | |
| 
 | |
| template <>
 | |
| struct JsonVariantAs<JsonObject> {
 | |
|   typedef JsonObject& type;
 | |
| };
 | |
| 
 | |
| template <>
 | |
| struct JsonVariantAs<const JsonObject> {
 | |
|   typedef const JsonObject& type;
 | |
| };
 | |
| }
 | |
| }
 |