Chapter 8: Obeserver Pattern

Hello guys, glad to be here studying with you all.

At chapter 8 when adding the class Score, inside QuestionGroup, is still not conforming to protocol ‘Encodable’ as the error says, even after completing the code described by the book. Anything I’m missing?

Thanks in advance.

@ygornascimento Thanks very much for your question!

From the sound of it, it appears that perhaps you have a typo in your code. This may not be obvious, but double check your code, as I have had this error occur to me many times when implementing the Codable protocol. Another possibility is that you have not included all of the properties that you have defined inside the function:

private enum CodingKeys: String, CodingKey {
case correctCount
case incorrectCount
}

I hope this helps :slight_smile:

All the best!