Class StacConvert
Static class with main (de)serialization methods for STAC objects.
Inheritance
System.Object
StacConvert
Namespace: Stac
Assembly: DotNetStac.dll
Syntax
public static class StacConvert : object
Methods
| Improve this Doc View SourceDeserialize<T>(Stream)
Deserialize a STAC object from a JSON stream.
Declaration
public static T Deserialize<T>(Stream stream)
where T : IStacObject
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The JSON stream to deserialize. |
Returns
Type | Description |
---|---|
T | The deserialized STAC object. |
Type Parameters
Name | Description |
---|---|
T | The type of the STAC object to deserialize. |
Deserialize<T>(String, JsonSerializerSettings)
Deserialize a STAC object from a JSON string.
Declaration
public static T Deserialize<T>(string json, JsonSerializerSettings serializerSettings = null)
where T : IStacObject
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The JSON string to deserialize. |
JsonSerializerSettings | serializerSettings | The JSON serializer settings to use. |
Returns
Type | Description |
---|---|
T | The deserialized STAC object. |
Type Parameters
Name | Description |
---|---|
T | The type of the STAC object to deserialize. |
Serialize(IStacObject, JsonSerializerSettings)
Serialize a STAC object to a JSON string.
Declaration
public static string Serialize(IStacObject stacObject, JsonSerializerSettings serializerSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | The STAC object to serialize. |
JsonSerializerSettings | serializerSettings | The JSON serializer settings to use. |
Returns
Type | Description |
---|---|
System.String | The serialized JSON string. |