fn empty_as_brackets<S, T>(t: &[T], s: S) -> Result<S::Ok, S::Error>
where
    T: Serialize,
    S: Serializer,
{
    if t.is_empty() {
        s.serialize_map(Some(0))?.end()
    } else {
        s.serialize_some(t)
    }
}
/// Serialise empty as brackets.
/// Kong represents an empty list as {}, so Kongfig expects the same to correctly diff the state to work out required changes.
Serialise empty as brackets.
Kong represents an empty list as {}, so Kongfig expects the same to correctly diff the state to work out required changes.
Serialise empty as brackets . Kong represents an empty list as {} so Kongfig expects the same to correctly diff the state to work out required changes .
fn empty_as_brackets<S, T>(t: &[T], s: S) -> Result<S::Ok, S::Error>
where
    T: Serialize,
    S: Serializer,
{
    if t.is_empty() {
        s.serialize_map(Some(0))?.end()
    } else {
        s.serialize_some(t)
    }
}
fn empty_as_brackets < S , T > ( t : & [ T ] , s : S ) -> Result < S :: Ok , S :: Error > where T : Serialize , S : Serializer , { if t . is_empty ( ) { s . serialize_map ( Some ( 0 ) ) ? . end ( ) } else { s . serialize_some ( t ) } }
Serialise empty as brackets.
Serialise empty as brackets .
t
&[T]
s
S
t
&[T]
s
S