1 #include "lib/spotify/savedalbum.hpp"
2 
to_json(nlohmann::json & j,const saved_album & s)3 void lib::spt::to_json(nlohmann::json &j, const saved_album &s)
4 {
5 	j = nlohmann::json{
6 		{"added_at", s.added_at},
7 		{"album", s.album},
8 	};
9 }
10 
from_json(const nlohmann::json & j,saved_album & s)11 void lib::spt::from_json(const nlohmann::json &j, saved_album &s)
12 {
13 	if (!j.is_object())
14 	{
15 		return;
16 	}
17 
18 	j.at("added_at").get_to(s.added_at);
19 	j.at("album").get_to(s.album);
20 }
21