Class JsonV1ResourceConverter
System.Text.Json: Converts V1ResourceRequirements.
Namespace: Neon.Kube.Resources.JsonConverters
Assembly: Neon.Kube.Resources.dll
Syntax
public class JsonV1ResourceConverter : JsonConverter<V1ResourceRequirements>
Methods
CanConvert(Type)
Determines whether the specified type can be converted.
Declaration
public override bool CanConvert(Type typeToConvert)
Parameters
Type | Name | Description |
---|---|---|
Type | typeToConvert | The type to compare against. |
Returns
Type | Description |
---|---|
bool |
Overrides
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type V1ResourceRequirements.
Declaration
public override V1ResourceRequirements Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonReader | reader | The reader. |
Type | typeToConvert | The type to convert. |
JsonSerializerOptions | options | An object that specifies serialization options to use. |
Returns
Type | Description |
---|---|
V1ResourceRequirements | The converted value. |
Overrides
Write(Utf8JsonWriter, V1ResourceRequirements, JsonSerializerOptions)
Writes a specified value as JSON.
Declaration
public override void Write(Utf8JsonWriter writer, V1ResourceRequirements value, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonWriter | writer | The writer to write to. |
V1ResourceRequirements | value | The value to convert to JSON. |
JsonSerializerOptions | options | An object that specifies serialization options to use. |