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
readerUtf8JsonReader-
The reader.
typeToConvertType-
The type to convert.
optionsJsonSerializerOptions-
An object that specifies serialization options to use.
Returns
Write(Utf8JsonWriter, List<Parameter>, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, List<Parameter> value, JsonSerializerOptions options)Parameters
writerUtf8JsonWriter-
The writer to write to.
valueList<Parameter>-
The value to convert to JSON.
optionsJsonSerializerOptions-
An object that specifies serialization options to use.