Show / Hide Table of Contents

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 Source

Deserialize<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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX