- dbg and + serde rename
parent
5dae0fe2a5
commit
abfb21f03b
|
|
@ -40,7 +40,7 @@ impl JsonParser {
|
||||||
.filter(|(idx, chr)| *idx > key_idx && *chr != ']')
|
.filter(|(idx, chr)| *idx > key_idx && *chr != ']')
|
||||||
.map(|(_, chr)| chr)
|
.map(|(_, chr)| chr)
|
||||||
.collect::<String>();
|
.collect::<String>();
|
||||||
dbg!(&key_tag);
|
// dbg!(&key_tag);
|
||||||
key.chars()
|
key.chars()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.filter(|(idx, _)| *idx < key_idx)
|
.filter(|(idx, _)| *idx < key_idx)
|
||||||
|
|
|
||||||
|
|
@ -148,15 +148,20 @@ impl ProcessedEndpoint {
|
||||||
|
|
||||||
pub mod v3 {
|
pub mod v3 {
|
||||||
pub use super::*;
|
pub use super::*;
|
||||||
|
|
||||||
|
// in config
|
||||||
|
#[derive(Deserialize)]
|
||||||
pub struct TestMetric {
|
pub struct TestMetric {
|
||||||
pub id : String,
|
pub id : String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
pub json_type : String,
|
pub json_type : String,
|
||||||
pub addr : String,
|
pub addr : String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct TestMetricOutput {
|
pub struct TestMetricOutput {
|
||||||
id : String,
|
id : String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
json_type : String,
|
json_type : String,
|
||||||
value : Value,
|
value : Value,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue