From 57c6c4f1c735dd74c8faa207f34e238f7c64d439 Mon Sep 17 00:00:00 2001 From: zivillian Date: Sat, 23 Mar 2024 14:02:11 +0100 Subject: [PATCH] fix json write value extraction for duplicated parameter names fixes #102 --- src/ism7mqtt/ISM7/Ism7Config.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ism7mqtt/ISM7/Ism7Config.cs b/src/ism7mqtt/ISM7/Ism7Config.cs index f8afc2a..436e46e 100644 --- a/src/ism7mqtt/ISM7/Ism7Config.cs +++ b/src/ism7mqtt/ISM7/Ism7Config.cs @@ -405,6 +405,7 @@ public bool TryGetWriteValue(JsonNode node, out string value) { if (node is not JsonObject jobject) return false; if (!jobject.TryGetPropertyValue(_descriptor.PTID.ToString(), out node)) return false; + value = node is JsonValue ? node.AsValue().ToString() : null; } if (_descriptor is ListParameterDescriptor listDescriptor) {