feat(comm): stream List attribute values as canonical JSON
Replace ValueFormatter.FormatDisplayValue with AttributeValueCodec.Encode in StreamRelayActor so List<T> attribute values cross the gRPC wire as a JSON array (e.g. ["a","b"]) rather than a comma-joined display string. Scalars and null values are unaffected. Tests cover List→JSON, scalar string pass-through, and null→empty-string.
This commit is contained in:
@@ -45,7 +45,7 @@ public class StreamRelayActor : ReceiveActor
|
||||
InstanceUniqueName = msg.InstanceUniqueName,
|
||||
AttributePath = msg.AttributePath,
|
||||
AttributeName = msg.AttributeName,
|
||||
Value = ValueFormatter.FormatDisplayValue(msg.Value),
|
||||
Value = AttributeValueCodec.Encode(msg.Value) ?? string.Empty,
|
||||
Quality = MapQuality(msg.Quality),
|
||||
Timestamp = Timestamp.FromDateTimeOffset(msg.Timestamp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user