The Codec class contains utility methods that encode and decode Alfa objects to and from JSON.
More...
The Codec class contains utility methods that encode and decode Alfa objects to and from JSON.
◆ FromJsonString< T >() [1/3]
static T alfa.rt.Codec.FromJsonString< T > |
( |
Assembly |
assembly, |
|
|
string |
json |
|
) |
| |
|
inlinestatic |
Construct an Alfa object from a JSON string
- Parameters
-
assembly | .NET Assembly containing target type |
json | JSON containing the string representation of the object |
- Template Parameters
-
- Returns
- An Alfa object
◆ FromJsonString< T >() [2/3]
Construct an Alfa object from a JSON string
- Parameters
-
codecConfig | Configuration for decoding |
json | JSON containing the string representation of the object |
- Template Parameters
-
- Returns
- An Alfa object
◆ FromJsonString< T >() [3/3]
static T alfa.rt.Codec.FromJsonString< T > |
( |
string |
json | ) |
|
|
inlinestatic |
Construct an Alfa object from a JSON string
- Parameters
-
json | JSON containing the string representation of the object |
- Template Parameters
-
- Returns
- An Alfa object
◆ toFormattedJson< T >()
static string alfa.rt.Codec.toFormattedJson< T > |
( |
T |
alfaObject | ) |
|
|
inlinestatic |
Constructs a Pretty JSON representation of an Alfa object
- Parameters
-
alfaObject | The Alfa object to convert |
- Template Parameters
-
- Returns
- Pretty printed JSON string representing the object
◆ ToJsonString< T >() [1/2]
Constructs a JSON representation of an Alfa object
- Parameters
-
cc | |
alfaObject | The Alfa object to convert |
- Template Parameters
-
- Returns
- JSON string representing the object
◆ ToJsonString< T >() [2/2]
static string alfa.rt.Codec.ToJsonString< T > |
( |
T |
alfaObject | ) |
|
|
inlinestatic |
Constructs a JSON representation of an Alfa object
- Parameters
-
alfaObject | The Alfa object to convert |
- Template Parameters
-
- Returns
- JSON string representing the object
The documentation for this class was generated from the following file:
- Alfa.Net.Runtime/src/main/alfa/rt/Codec.cs