groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adithyank <>
Subject Re: Java object conversion using ConfigSlurper
Date Wed, 16 May 2018 14:00:27 GMT
Yes Jesper,

It works. But, If that `MyConfig` class has fields of `List` or `Map` types,
then it does not work. I am looking this feature as a way of converting
`ConfigObject` (inturn Map<String, Map&lt;Stirng, Map&lt;String,
Map&lt;String>>>>....) of any levels to its respective java object with
nested `List<anyclass>`, `Map<anyclass>`, `Other classes`.

Now, what decision can we take? Below are the options

1. I will look on the existing coercion codes to some how fit this use case
of creating nested objects recursively
2. `T ConfigObject.getAs(Class<T>)` can be implemented without affecting the
existing semantics of `Map as SomeClass`

Pls advice

Sent from:

View raw message