added json doc-comment
test-org/integration-module/pipeline/pr-rc This commit looks good Details

feature/1126
prplV 2025-03-05 13:40:41 +03:00
parent 5e8eadac9b
commit 96dc94bf0b
1 changed files with 15 additions and 0 deletions

View File

@ -2,6 +2,21 @@
use serde_json::{json, Value};
use integr_structs::api::v3::{Metric, MetricOutput};
/// A JSON-parser struct
///
/// Using in metric extracting from Server Response
/// with metrics mechanism
///
/// # Example
///
/// ```
/// use api-grub::json::JsonParser;
/// use use integr_structs::api::v3::Metric;
///
/// let json = b""flat1" : { "room1" : { "rt_tempo" : "+16" }}".to_vec();
///
/// assert!(!JsonParser::parse(vec![Metric::template()], json).is_empty());
/// ```
pub struct JsonParser;
impl JsonParser {