Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ByteArrayEncoder.cs
1
using
System;
2
using
System.Text;
3
using
Waher.Runtime.Inventory
;
4
5
namespace
Waher.Content.Json.ReferenceTypes
6
{
10
public
class
ByteArrayEncoder
:
IJsonEncoder
11
{
15
public
ByteArrayEncoder
()
16
{
17
}
18
25
public
void
Encode
(
object
Object,
int
? Indent, StringBuilder Json)
26
{
27
Json.Append(
'"'
);
28
Json.Append(Convert.ToBase64String((
byte
[])Object));
29
Json.Append(
'"'
);
30
}
31
37
public
Grade
Supports
(Type ObjectType)
38
{
39
return
ObjectType == typeof(
byte
[]) ? Grade.Ok :
Grade
.NotAtAll;
40
}
41
}
42
}
Waher.Content.Json.ReferenceTypes.ByteArrayEncoder
Encodes byte() values.
Definition:
ByteArrayEncoder.cs:11
Waher.Content.Json.ReferenceTypes.ByteArrayEncoder.ByteArrayEncoder
ByteArrayEncoder()
Encodes byte() values.
Definition:
ByteArrayEncoder.cs:15
Waher.Content.Json.ReferenceTypes.ByteArrayEncoder.Supports
Grade Supports(Type ObjectType)
How well the JSON encoder encodes objects of type ObjectType .
Definition:
ByteArrayEncoder.cs:37
Waher.Content.Json.ReferenceTypes.ByteArrayEncoder.Encode
void Encode(object Object, int? Indent, StringBuilder Json)
Encodes the Object to JSON.
Definition:
ByteArrayEncoder.cs:25
Waher.Content.Json.IJsonEncoder
Interface for encoding objects of certain types to JSON.
Definition:
IJsonEncoder.cs:11
Waher.Content.Json.ReferenceTypes
Definition:
ByteArrayEncoder.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
ReferenceTypes
ByteArrayEncoder.cs
Generated by
1.9.5