Zongzuixi114514/moonmarc/formats/marcjson does not have a README file

    JsonConversionError

    pub(all) suberror JsonConversionError {
    InvalidJson(String)
    MissingField(String)
    WrongType(String)
    InvalidValue(String)
    InvalidLeader(String)
    InvalidTag(String)
    } derive(Eq,
    Debug
    )

    Errors raised when converting between MARC records and the JSON interchange shape.

    JsonConversionError::to_string

    fn JsonConversionError::to_string(self : JsonConversionError) -> String

    record_from_json

    Convert one JSON value in the MoonMARC interchange shape to a record.

    record_from_json_text

    fn record_from_json_text(text : String) -> Result[
    MarcRecord
    , JsonConversionError]

    Parse JSON text and convert it to one structured MARC 21 record.

    record_to_json

    Convert one structured MARC 21 record to the MoonMARC JSON shape.

    record_to_json_text

    fn record_to_json_text(record :
    MarcRecord
    , indent? : Int) -> String

    Render one record as JSON text. The optional indent is passed to the core JSON stringifier.

    records_from_json

    Convert a JSON array to structured MARC 21 records.

    records_from_json_text

    fn records_from_json_text(text : String) -> Result[Array[
    MarcRecord
    ], JsonConversionError]

    Parse JSON text containing an array of records.

    records_to_json

    Convert multiple structured MARC records to a JSON array.

    records_to_json_text

    fn records_to_json_text(records : Array[
    MarcRecord
    ], indent? : Int) -> String

    Render multiple records as a JSON array text.

    Source Files