From f017a31bb56aacf640ae4978605b8babe6b2a1e4 Mon Sep 17 00:00:00 2001 From: Jean Marcel Herzog Date: Sun, 29 Mar 2026 20:00:37 +0200 Subject: [PATCH] Serialize/Deserialize AddData Data items to serde_json::Value --- plcopen/Cargo.toml | 1 + plcopen/generated/generated_addons.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plcopen/Cargo.toml b/plcopen/Cargo.toml index 0707a09..f6ee477 100644 --- a/plcopen/Cargo.toml +++ b/plcopen/Cargo.toml @@ -18,3 +18,4 @@ quick-xml = { version = "0.37", features = ["serialize", "overlapped-lists"] } serde = { version = "1.0", features = ["derive"] } iec61131 = { path = "../iec61131", version = "0.7" } thiserror = "1.0" +serde_json = "1.0" \ No newline at end of file diff --git a/plcopen/generated/generated_addons.rs b/plcopen/generated/generated_addons.rs index 69f638a..a6c2cff 100644 --- a/plcopen/generated/generated_addons.rs +++ b/plcopen/generated/generated_addons.rs @@ -26,9 +26,9 @@ pub struct AddData_data_Inline { /// Text content #[serde(rename = "$text", default)] pub text: Option, - /// Arbitrary child elements (xs:any) - captured as text content - #[serde(skip)] - pub children: Vec, + /// Arbitrary child elements (xs:any) + #[serde(flatten)] + pub children: std::collections::HashMap, } /// addDataInfo element