jsonapi_core_derive 0.1.2

Derive macro for jsonapi_core
Documentation

jsonapi_core_derive

Procedural derive macro for the jsonapi_core crate.

This crate exposes only the #[derive(JsonApi)] macro. You almost certainly do not want to depend on it directly — instead, depend on jsonapi_core with the default derive feature enabled (which re-exports the macro):

[dependencies]
jsonapi_core = "0.1"
use jsonapi_core::JsonApi;

#[derive(JsonApi)]
#[jsonapi(type = "articles")]
struct Article {
    #[jsonapi(id)]
    id: String,
    title: String,
}

See the jsonapi_core documentation and the derive macro reference for the full list of attributes and behaviour.

License

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