forma_sif 0.1.0

SIF serialization and deserialization for forma_core.
Documentation
  • Coverage
  • 56.67%
    17 out of 30 items documented1 out of 15 items with examples
  • Size
  • Source code size: 51.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • scalecode-solutions

forma_sif

SIF (Structured Interchange Format) serializer and deserializer for the forma serialization framework.

Most users should use forma with the sif feature instead of depending on this crate directly:

[dependencies]
forma = { version = "0.1", features = ["derive", "sif"] }

Quick Example

use forma_sif::{to_string, from_str};
use forma_derive::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct Row {
    id: u64,
    name: String,
    active: bool,
}

let rows = vec![
    Row { id: 1, name: "alice".into(), active: true },
    Row { id: 2, name: "bob".into(), active: false },
];

let sif = to_string(&rows).unwrap();
let back: Vec<Row> = from_str(&sif).unwrap();
assert_eq!(back, rows);

SIF is a tabular, schema-aware text format designed for structured data interchange. See the SIF specification for details.

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.