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
		
			
				
	
	
		
			52 lines
		
	
	
		
			924 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			924 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 <stdlib.h>
 | |
| 
 | |
| namespace ArduinoJson {
 | |
| namespace Internals {
 | |
| template <typename TFloat>
 | |
| TFloat parse(const char *);
 | |
| 
 | |
| template <>
 | |
| inline float parse<float>(const char *s) {
 | |
|   return static_cast<float>(strtod(s, NULL));
 | |
| }
 | |
| 
 | |
| template <>
 | |
| inline double parse<double>(const char *s) {
 | |
|   return strtod(s, NULL);
 | |
| }
 | |
| 
 | |
| template <>
 | |
| inline long parse<long>(const char *s) {
 | |
|   return strtol(s, NULL, 10);
 | |
| }
 | |
| 
 | |
| template <>
 | |
| inline int parse<int>(const char *s) {
 | |
|   return atoi(s);
 | |
| }
 | |
| 
 | |
| #if ARDUINOJSON_USE_LONG_LONG
 | |
| template <>
 | |
| inline long long parse<long long>(const char *s) {
 | |
|   return strtoll(s, NULL, 10);
 | |
| }
 | |
| #endif
 | |
| 
 | |
| #if ARDUINOJSON_USE_INT64
 | |
| template <>
 | |
| inline __int64 parse<__int64>(const char *s) {
 | |
|   return _strtoi64(s, NULL, 10);
 | |
| }
 | |
| #endif
 | |
| }
 | |
| }
 |