OxL Справочник OxL
РусскийEnglish

module std.ser.formats

std.ser.formats — the built-in formats under the names of the standard (formats.oxl/json/msgpack/cbor, II.1).

Example:

oxl✓ проверяется в CI
use std.ser { encode, formats }

fn main() io {
  let a = encode(&7, formats.msgpack)!
  let b = encode(&7, formats.cbor)!
  print("{a.len()} {b.len()}")
}
Вывод
1 1

Константы

cborCBOR (RFC 8949, D-7600).
jsonCanonical protobuf JSON mapping.
msgpackMessagePack (D-7600).
oxlThe OxL binary format (protobuf 3 wire encoding, §9.3); the default of encode / decode.

См. также