mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Minor simplifications
This commit is contained in:
		| @@ -30,20 +30,6 @@ namespace JsonGeneratorTests | |||||||
|             AssertJsonIs("[\"hello\"]"); |             AssertJsonIs("[\"hello\"]"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         TEST_METHOD(AddOneStringContainingDoubleQuote) |  | ||||||
|         { |  | ||||||
|             arr.add("\""); |  | ||||||
|  |  | ||||||
|             AssertJsonIs("[\"\\\"\"]"); |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         TEST_METHOD(AddOneStringContainingBackslash) |  | ||||||
|         { |  | ||||||
|             arr.add("\\"); |  | ||||||
|  |  | ||||||
|             AssertJsonIs("[\"\\\\\"]"); |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         TEST_METHOD(AddTwoStrings) |         TEST_METHOD(AddTwoStrings) | ||||||
|         { |         { | ||||||
|             arr.add("hello"); |             arr.add("hello"); | ||||||
|   | |||||||
| @@ -5,10 +5,7 @@ void JsonObjectBase::writeObjectTo(ObjectContainer& obj, StringBuilder& sb) | |||||||
|     switch (obj.type) |     switch (obj.type) | ||||||
|     { |     { | ||||||
|     case JSON_STRING: |     case JSON_STRING: | ||||||
|         if (obj.value.string) |         sb.appendEscaped(obj.value.string); | ||||||
|             sb.appendEscaped(obj.value.string); |  | ||||||
|         else |  | ||||||
|             sb.append("null"); |  | ||||||
|         break; |         break; | ||||||
|  |  | ||||||
|     case JSON_NUMBER: |     case JSON_NUMBER: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user