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  void quote(String& value) const override;
24 
25  MimeType mimeType() const override
26  {
27  return MIME_JSON;
28  }
29 };
30 
31 extern Json json;
32 
33 } // namespace Format
void quote(String &value) const override
Convert a value into quoted string.
MimeType mimeType() const override
Corresponding MIME type for this format.
Definition: Json.h:25
void escape(String &value) const override
Perform any necessary text escaping so output is valid.
Definition: Standard.h:20
The String class.
Definition: WString.h:133
MimeType
Definition: WebConstants.h:53
Definition: Formatter.h:20
Json json
Definition: ArduinoJson.h:58