dpp/data_contract/conversion/json/v0/
mod.rs1use crate::version::PlatformVersion;
2use crate::ProtocolError;
3use serde_json::Value as JsonValue;
4
5pub trait DataContractJsonConversionMethodsV0 {
6 fn from_json(
7 json_value: JsonValue,
8 full_validation: bool,
9 platform_version: &PlatformVersion,
10 ) -> Result<Self, ProtocolError>
11 where
12 Self: Sized;
13
14 fn to_json(&self, platform_version: &PlatformVersion) -> Result<JsonValue, ProtocolError>;
16 fn to_validating_json(
18 &self,
19 platform_version: &PlatformVersion,
20 ) -> Result<JsonValue, ProtocolError>;
21}