pub struct JsonAdapter;
Expand description
Adapter for converting between domain JsonData and infrastructure JSON
Implementations§
Source§impl JsonAdapter
impl JsonAdapter
Sourcepub fn to_serde_value(data: &JsonData) -> SerdeValue
pub fn to_serde_value(data: &JsonData) -> SerdeValue
Convert domain JsonData to serde_json::Value for infrastructure layer
Sourcepub fn from_serde_value(value: &SerdeValue) -> JsonData
pub fn from_serde_value(value: &SerdeValue) -> JsonData
Convert serde_json::Value to domain JsonData
Sourcepub fn parse_json_string(json_str: &str) -> Result<JsonData, Error>
pub fn parse_json_string(json_str: &str) -> Result<JsonData, Error>
Convert JSON string to domain JsonData
Sourcepub fn to_json_string(data: &JsonData) -> Result<String, Error>
pub fn to_json_string(data: &JsonData) -> Result<String, Error>
Convert domain JsonData to JSON string
Sourcepub fn to_json_string_pretty(data: &JsonData) -> Result<String, Error>
pub fn to_json_string_pretty(data: &JsonData) -> Result<String, Error>
Convert domain JsonData to pretty JSON string
Sourcepub fn merge(left: JsonData, right: JsonData) -> JsonData
pub fn merge(left: JsonData, right: JsonData) -> JsonData
Merge two JsonData objects (right takes precedence)
Sourcepub fn deep_clone(data: &JsonData) -> JsonData
pub fn deep_clone(data: &JsonData) -> JsonData
Deep clone JsonData
Sourcepub fn validate_pjs_structure(data: &JsonData) -> Result<(), String>
pub fn validate_pjs_structure(data: &JsonData) -> Result<(), String>
Validate that JsonData structure is valid for PJS protocol
Sourcepub fn extract_leaf_paths(data: &JsonData) -> Vec<String>
pub fn extract_leaf_paths(data: &JsonData) -> Vec<String>
Extract all leaf paths from JsonData for priority analysis
Auto Trait Implementations§
impl Freeze for JsonAdapter
impl RefUnwindSafe for JsonAdapter
impl Send for JsonAdapter
impl Sync for JsonAdapter
impl Unpin for JsonAdapter
impl UnwindSafe for JsonAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more