<@UJV6CBCKW> qq - does it work with a map instead ...
# http4k
d
@Razi Kheir qq - does it work with a map instead of an object ?
👍 1
r
Using map instead of data class for contracts? Did not see an example of that so assumed it’s not possible. I’ll try 🙂
I guess I can’t really use the convenience of data classes for lensing responses with special characters in them 😞 idk why they are using them instead of underscores, but it will definitely not change xD
d
It's all to do with the ability to associate the field name with the field in the class. You can write a custom Field retriever and plug that in, but I'm wary of doing that as a generic rule. TBH, I've never seen json field names with colons in! 🙃
r
I know right -_- but this is a big company, this will never change haha I just have to work with it. Yeah I understand its not a general thing and I don’t expect it in the library, I’ll figure it out 🙂 thanks David
I ended up using moshi @field:Json name by the way 😮