mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			535 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			535 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "ArduinoJson/Internals/JsonWriter.h"
 | |
| #include "ArduinoJson/Internals/EscapedString.h"
 | |
| 
 | |
| using namespace ArduinoJson::Internals;
 | |
| 
 | |
| void JsonWriter::writeString(char const* value)
 | |
| {
 | |
|     _length += EscapedString::printTo(value, _sink);
 | |
| }
 | |
| 
 | |
| void JsonWriter::writeInteger(long value)
 | |
| {
 | |
| 
 | |
|     _length += _sink->print(value);
 | |
| }
 | |
| 
 | |
| void JsonWriter::writeBoolean(bool value)
 | |
| {
 | |
|     _length += _sink->print(value ? "true" : "false");
 | |
| }
 | |
| 
 | |
| void JsonWriter::writeDouble(double value, int decimals)
 | |
| {
 | |
|     _length += _sink->print(value, decimals);
 | |
| } |