pub enum JsonFormat {
Json,
Jsonl,
}Expand description
Which grammar a JSON source is read with.
The two are deliberately distinct: whitespace is insignificant inside a
standard JSON document and load-bearing in JSONL, so one input cannot be
valid under both readings and mean the same thing. Callers pick with
format="json" / format="jsonl", or by file extension.
Variants§
Json
A standard JSON document, in either of the two shapes that carry
records: an array of objects ([{...}, {...}]), or a single object
({...}) as one record. Values may span lines and be pretty-printed,
and exactly one document must fill the whole input.
Jsonl
JSON Lines — one record per physical line. A record may not span lines, and a line may not hold more than one value.
Trait Implementations§
Source§impl Clone for JsonFormat
impl Clone for JsonFormat
impl Copy for JsonFormat
Source§impl Debug for JsonFormat
impl Debug for JsonFormat
impl Eq for JsonFormat
Source§impl PartialEq for JsonFormat
impl PartialEq for JsonFormat
impl StructuralPartialEq for JsonFormat
Auto Trait Implementations§
impl Freeze for JsonFormat
impl RefUnwindSafe for JsonFormat
impl Send for JsonFormat
impl Sync for JsonFormat
impl Unpin for JsonFormat
impl UnsafeUnpin for JsonFormat
impl UnwindSafe for JsonFormat
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.