Table of Contents

Class ParameterListConverter

Namespace
RvtIO.Model
Assembly
RvtIO.dll

Serializes an element's parameter list as a compact id -> value map ({ "-1006401": 0.0049, "262801": "Type A" }) instead of an array of { "Id", "Value" } objects. Every other parameter field is invariant per definition id and lives in RvtIO.Model.RevitFileInfo.ParameterDefinitions, so the only per-instance data is the value - making the map a lossless, much smaller encoding. Write-only; the in-memory model keeps the full System.Collections.Generic.List`1.

public class ParameterListConverter : JsonConverter<List<Parameter>>

Inheritance

Inherited Members

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type System.Collections.Generic.List{RvtIO.Model.Parameter}.

public override List<Parameter> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An object that specifies serialization options to use.

Returns

List<Parameter>

The converted value.

Write(Utf8JsonWriter, List<Parameter>, JsonSerializerOptions)

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, List<Parameter> value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

value List<Parameter>

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.