Fixed json serialization

The heterogenous list was breaking the serialization. Needs to declare an implicit writer at the abstract trait level, which deals with the different cases