Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IntegerEncoder.cs
1using System;
2using System.Text;
4
6{
11 {
16 {
17 }
18
25 public void Encode(object Object, int? Indent, StringBuilder Json)
26 {
27 Json.Append(Object.ToString());
28 }
29
35 public Grade Supports(Type ObjectType)
36 {
37 return
38 ObjectType == typeof(int) ||
39 ObjectType == typeof(long) ||
40 ObjectType == typeof(short) ||
41 ObjectType == typeof(byte) ||
42 ObjectType == typeof(uint) ||
43 ObjectType == typeof(ulong) ||
44 ObjectType == typeof(ushort) ||
45 ObjectType == typeof(sbyte) ? Grade.Excellent : Grade.NotAtAll;
46 }
47 }
48}
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 .
Interface for encoding objects of certain types to JSON.
Definition: IJsonEncoder.cs:11
Grade
Grade enumeration
Definition: Grade.cs:7