Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IntegerEncoder.cs
1
using
System;
2
using
System.Text;
3
using
Waher.Runtime.Inventory
;
4
5
namespace
Waher.Content.Json.ValueTypes
6
{
10
public
class
IntegerEncoder
:
IJsonEncoder
11
{
15
public
IntegerEncoder
()
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
}
Waher.Content.Json.ValueTypes.IntegerEncoder
Encodes double values.
Definition:
IntegerEncoder.cs:11
Waher.Content.Json.ValueTypes.IntegerEncoder.IntegerEncoder
IntegerEncoder()
Encodes double values.
Definition:
IntegerEncoder.cs:15
Waher.Content.Json.ValueTypes.IntegerEncoder.Encode
void Encode(object Object, int? Indent, StringBuilder Json)
Encodes the Object to JSON.
Definition:
IntegerEncoder.cs:25
Waher.Content.Json.ValueTypes.IntegerEncoder.Supports
Grade Supports(Type ObjectType)
How well the JSON encoder encodes objects of type ObjectType .
Definition:
IntegerEncoder.cs:35
Waher.Content.Json.IJsonEncoder
Interface for encoding objects of certain types to JSON.
Definition:
IJsonEncoder.cs:11
Waher.Content.Json.ValueTypes
Definition:
BooleanEncoder.cs:6
Waher.Runtime.Inventory
Definition:
TypesLoader.cs:9
Waher.Runtime.Inventory.Grade
Grade
Grade enumeration
Definition:
Grade.cs:7
IoTGateway
Content
Waher.Content
Json
ValueTypes
IntegerEncoder.cs
Generated by
1.9.5