/// Converts a Manticore command into a JSON object.
///
/// This funciton deserializes a header + message in wire format from `input`
/// and then serialize the message as JSON to `output`.
Converts a Manticore command into a JSON object.
This funciton deserializes a header + message in wire format from `input`
and then serialize the message as JSON to `output`.
Converts a Manticore command into a JSON object . This funciton deserializes a header + message in wire format from ` input ` and then serialize the message as JSON to ` output ` .
fn to_json(pretty: bool, input: impl Read, output: impl Write) {
    read_wire_and_operate!(input, |msg| {
        if pretty {
            serde_json::to_writer_pretty(output, &msg)
        } else {
            serde_json::to_writer(output, &msg)
        }
        .expect("failed to serialize to JSON")
    });
}
fn to_json ( pretty : bool , input : impl Read , output : impl Write ) { read_wire_and_operate ! ( input msg { if pretty { serde_json to_writer_pretty ( output msg ) } else { serde_json to_writer ( output msg ) } expect ( " " ) } ) ; }
Converts a Manticore command into a JSON object.
Converts a Manticore command into a JSON object .
pretty
bool
input
impl Read
output
impl Write