#json-schema #schema #interface-generation

macro schema_oxidation

Produce Rust data structures from JSON schemas

2 releases

0.1.1 Nov 21, 2021
0.1.0 Nov 19, 2021

#123 in #json-schema

23 downloads per month

BSD-3-Clause

12KB
200 lines

schema_oxidation: conversion from JSON schemas to Rust objects.

This crate provides a way to automatically generate Rust objects (with serialization / deserialization provided by serde) from a pre-existing JSON schema. Currently only fairly basic support is present, though it is sufficient for simple purposes.

The schema JSON can either be loaded from a file located in the project's source tree, or from a string. The latter is primarily useful for testing purposes, though they both function identically under the hood.

Dependencies

~3–5MB
~89K SLoC