Class AbsoluteDirectoryPathJsonConverter
Converts IAbsoluteDirectoryPath paths to and from JSON strings, both as values and as dictionary keys. Paths are written as their PathDisplay string. Strings are read in the current platform's path format, as the Parse methods on FilePath and DirectoryPath read them on the platform the app runs on with the None option, so a path in that format reads back as
the same path. A string in the other platform's absolute form, such as C:\data</code> on Unix or /data/ on Windows, is not read as an absolute
path.
Inheritance
Inherited Members
Namespace: Singulink.IO.Json
Assembly: Singulink.IO.FileSystem.dll
Syntax
public sealed class AbsoluteDirectoryPathJsonConverter : JsonConverter<IAbsoluteDirectoryPath>
Methods
| Name | Description |
|---|---|
| CanConvert(Type) | Determines whether the specified type can be converted. |
| Read(ref Utf8JsonReader, Type, JsonSerializerOptions) | Reads and converts the JSON to type IAbsoluteDirectoryPath. |
| ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions) | Reads a dictionary key from a JSON property name. |
| Write(Utf8JsonWriter, IAbsoluteDirectoryPath, JsonSerializerOptions) | Writes a specified value as JSON. |
| WriteAsPropertyName(Utf8JsonWriter, IAbsoluteDirectoryPath, JsonSerializerOptions) | Writes a dictionary key as a JSON property name. |