Make abstract data class implement json serializable