aggregates can write a json representation