() is none in JSON.
@@ -791,7 +791,7 @@ fn api_status(origins: &OriginsHistory) -> Response<Body> {
target.member_str("lastUpdateDone", done.format("%+"));
}
else {
- target.member_raw("lastUpdateDone", "none");
+ target.member_raw("lastUpdateDone", "null");
}
if let Some(duration) = duration {
target.member_raw("lastUpdateDuration",
@@ -837,7 +837,7 @@ fn api_status(origins: &OriginsHistory) -> Response<Body> {
format_args!("{:.3}", duration.as_secs_f32())
);
}
- Err(_) => target.member_raw("duration", "none")
+ Err(_) => target.member_raw("duration", "null")
}
})
}
@@ -866,19 +866,19 @@ fn api_status(origins: &OriginsHistory) -> Response<Body> {
format_args!("{:.3}", duration.as_secs_f32())
);
}
- Err(_) => target.member_raw("duration", "none")
+ Err(_) => target.member_raw("duration", "null")
}
match metrics.serial {
Some(serial) => {
target.member_raw("serial", serial);
}
- None => target.member_raw("serial", "none")
+ None => target.member_raw("serial", "null")
}
match metrics.session {
Some(session) => {
target.member_str("session", session);
}
- None => target.member_raw("session", "none")
+ None => target.member_raw("session", "null")
}
target.member_raw("delta",
if metrics.snapshot_reason.is_none() { "true" }
@@ -888,7 +888,7 @@ fn api_status(origins: &OriginsHistory) -> Response<Body> {
target.member_str("snapshot_reason", reason.code())
}
else {
- target.member_raw("snapshot_reason", "none");
+ target.member_raw("snapshot_reason", "null");
}
})
}
