Stylianos Gakis
05/23/2022, 2:51 PMthis.activeFrom = JavaLocalDateAdapter.toJsonString(
LocalDate.of(2021, 4, 11), // I guess no need to pass anything for customScalarAdapters here
)
And then this line inside build should take are of it right? "activeFrom" to resolve("activeFrom", LocalDate.type, emptyList()),
And a couple of thoughts if I assume that this is the way to do it. I’d of course optimally like to be able to just give it the object itself, but maybe this isn’t possible with the way the test builders are made. Maybe some convenience function could be generated that does this for us?mbonnin
05/23/2022, 3:05 PMmbonnin
05/23/2022, 3:05 PMmbonnin
05/23/2022, 3:08 PMmbonnin
05/23/2022, 3:10 PMStylianos Gakis
05/23/2022, 3:10 PMmbonnin
05/23/2022, 3:10 PMmbonnin
05/23/2022, 3:11 PMCustomScalarAdapters.EMPTY
mbonnin
05/23/2022, 3:11 PMAdapter
API. We're using the same interface for 2 different thingsmbonnin
05/23/2022, 3:11 PMCustomScalarAdapters
instance to serialize/deserializeStylianos Gakis
05/23/2022, 3:12 PMmbonnin
05/23/2022, 3:12 PMmbonnin
05/23/2022, 3:13 PMStylianos Gakis
05/23/2022, 3:13 PMmbonnin
05/23/2022, 3:14 PMCustomScalarAdapter
parameter that's not always useful
• For compound types it is useful in order to know how to serialize/deserialize fields
• For scalar types, it is never usedmbonnin
05/23/2022, 3:15 PMmbonnin
05/23/2022, 3:16 PMfromJson(jsonReader: JsonReader)
, not fromJson(jsonReader: JsonReader, customScalarAdapters: CustomScalarAdapters)
mbonnin
05/23/2022, 3:16 PMAdapter
interface but it's something that has been itching me for a whileStylianos Gakis
05/23/2022, 3:16 PMStylianos Gakis
05/23/2022, 3:17 PMmbonnin
05/23/2022, 3:18 PMAdapter<>
is sooo ubiquitous I don't want to touch it too muchmbonnin
05/23/2022, 3:18 PMStylianos Gakis
05/23/2022, 3:26 PM