Class VBTypedValueJsonConverter
Serializes a VBTypedValue as { "type": <name>, "value": <scalar> }.
public sealed class VBTypedValueJsonConverter : JsonConverter<VBTypedValue>
- Inheritance
-
VBTypedValueJsonConverter
- Inherited Members
Remarks
👉 The only VBTypedValue that crosses a process boundary is the one an AST resolves for a literal — always a compile-time scalar or a sentinel. Reference-valued kinds (objects, arrays, UDTs, Variants) carry identity / storage semantics, never appear in an AST, and are rejected here.
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type VBTypedValue.
public override VBTypedValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
Returns
- VBTypedValue
The converted value.
Write(Utf8JsonWriter, VBTypedValue, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, VBTypedValue value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriterThe writer to write to.
valueVBTypedValueThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.