Relation DB to JSON and vice-versa made for the lazy