Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
XmlDocumentJsonEncoder.cs
1using System;
2using System.Text;
3using System.Xml;
6
8{
13 {
18 {
19 }
20
27 public void Encode(object Object, int? Indent, StringBuilder Json)
28 {
29 XmlDocument Xml = (XmlDocument)Object;
30
31 if (Xml.DocumentElement is null)
32 Json.Append("null");
33 else
34 XmlElementJsonEncoder.Encode(Xml.DocumentElement, Indent, Json);
35 }
36
42 public Grade Supports(Type ObjectType)
43 {
44 return ObjectType == typeof(XmlDocument) ? Grade.Ok : Grade.NotAtAll;
45 }
46 }
47}
Encodes an XML Document as a JSON object.
void Encode(object Object, int? Indent, StringBuilder Json)
Encodes the Object to JSON.
Grade Supports(Type ObjectType)
How well the JSON encoder encodes objects of type ObjectType .
XmlDocumentJsonEncoder()
Encodes an XML Document as a JSON object.
Encodes an XML Element as a JSON object.
void Encode(object Object, int? Indent, StringBuilder Json)
Encodes the Object to JSON.
Interface for encoding objects of certain types to JSON.
Definition: IJsonEncoder.cs:11
Grade
Grade enumeration
Definition: Grade.cs:7