have extended classes implement toJson