Enum quickxml_to_serde::JsonArray
source · pub enum JsonArray {
Always(JsonType),
Infer(JsonType),
}
Expand description
Defines how the values of this Node should be converted into a JSON array with the underlying types.
Infer
- the nodes are converted into a JSON array only if there are multiple identical elements. E.g.<a><b>1</b></a>
becomes a map{"a": {"b": 1 }}
and<a><b>1</b><b>2</b><b>3</b></a>
becomes an array{"a": {"b": [1, 2, 3] }}
Always
- the nodes are converted into a JSON array regardless of how many there are. E.g.<a><b>1</b></a>
becomes an array with a single value{"a": {"b": [1] }}
and<a><b>1</b><b>2</b><b>3</b></a>
also becomes an array{"a": {"b": [1, 2, 3] }}
Variants§
Always(JsonType)
Convert the nodes into a JSON array even if there is only one element
Infer(JsonType)
Convert the nodes into a JSON array only if there are multiple identical elements
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for JsonArray
impl Send for JsonArray
impl Sync for JsonArray
impl Unpin for JsonArray
impl UnwindSafe for JsonArray
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more