January 2018
Intermediate to advanced
414 pages
10h 29m
English
Now that we understand serialization a bit more, we can modify our customer class to create an inner class.
You can delete the previously created SimpleObject and JSonExamplesController since we are going to use our API services to explain further these concepts:
package com.microservices.chapter3data class Customer(var id: Int = 0, var name: String = "", var telephone: Telephone) { data class Telephone(var countryCode: String = "", var telephoneNumber: String = "")}
If we now run our code, we get a compilation error since in our service. We have an initial set of customers that don't have a telephone, let's just add some to them:
package com.microservices.chapter3import com.microservices.chapter3.Customer.Telephone ...
Read now
Unlock full access