FoundYourStuff / core

0 stars 0 forks source link

JSONify our classes #39

Open Camology opened 3 years ago

Camology commented 3 years ago

Currently you have to do some annoying stuff with returning our objects like:

return {"id":tag.id, "external_id":tag.external_id, "name":tag.name, "picture":tag.picture}

Which is fine and manageable but if we add another attribute to our class you have to update that in 3 places. Instead JSONify our classes via a method or something pythonic to make this manageable going forward.

Arsh25 commented 3 years ago

This library could be useful and easy to implement. We just have to ensure that we are not passing it any usanitized user provided data