michaelhugi / gdtf_parser

A GDTF parser library for rust
1 stars 2 forks source link

Derive serde Serialization #3

Open JonasFocke01 opened 1 year ago

JonasFocke01 commented 1 year ago

Hello @michaelhugi,

first of all: Thank you for your work! This helps me allot!

Reasoning

While working the first bits with your projekt, i was passing the Gdtf struct around. This worked fine in my app, but i also have to provide some rest endpoints. To make it passable to many rest frameworks (axum in my case) the struct needs to be Serializable with serde. I thought, that that would be a good addition to your crate to make it more available to others.

What i did

I added serde as a dependency and simply added the serde derive macro to the struct and each sub struct that required the macro. No logic code written.