Json.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * Json.h
8  *
9  * @author mikee47 <mike@sillyhouse.net> Nov 2020
10  *
11  ****/
12 
13 #pragma once
14 
15 #include "Standard.h"
16 
17 namespace Format
18 {
19 class Json : public Standard
20 {
21 public:
22  void escape(String& value) const override;
23 
24  MimeType mimeType() const override
25  {
26  return MIME_JSON;
27  }
28 };
29 
30 extern Json json;
31 
32 } // namespace Format
void escape(String &value) const override
Perform any necessary text escaping so output is valid.
The String class.
Definition: WString.h:136
MimeType mimeType() const override
Correspdoning MIME type for this format.
Definition: Json.h:24
Json json
Definition: Formatter.h:18
Definition: ArduinoJson.h:57
MimeType
Definition: WebConstants.h:53
Definition: Standard.h:19