Crate schemajen

Source
Expand description

§SchemaJen

Auto-magically infer language bindings given a JSON schema.

If you are a user and not a contributor, go back to the Github page as this is probably not for you.

§Usage

use schemajen::*;

//  See [`ACCUMULATOR_SUPPORT_LIST`] for string options.
//  let mut accumulator = accumulator_choose_with_str("rust");

let mut accumulator = Box::new(RustAccumulator::begin());
let res = generate(accumulator.as_mut(), "MyType", r#"{"a": 10}"#);
let res = res.unwrap();
eprintln!("{}", res);

§Contributing

All code generators (aka accumulators) are found in codegen.

Re-exports§

pub use json;
pub use codegen::*;

Modules§

codegen
See ACCUMULATOR_SUPPORT_LIST for the list of supported accumulators.

Enums§

Error
JsonType
Number

Traits§

TypeAccumulator

Functions§

generate
Generate language bindings using a provided accumulator. See the codegen for supported accumulators or build your own.