adding a json serializer for the stats