Closed yogurtearl closed 2 years ago
Yes sounds good, if you want to provide some interface that allows the json parser to be specified.
Started looking at adding this, but it seems that moshi works on types only, and I can't get a generic "tree" of the json. Without that, we can't build the arbitrary maps that Hoplite uses, because the json config files aren't always a one to one mapping with your config types, because of the cascading.
@yogurtearl I will close this based on the above comments, unless you know a way to achieve what we need with moshi.
If I want to use
hoplite-json
in a kotlin app that only usesMoshi
, currently there is no way to avoid bringing in Jackson as a dep.It would be great to avoid bringing in a separate JSON parser just for hoplite.
this can be accomplished with something like the ConverterFactory concept that Retrofit has: https://github.com/square/retrofit/tree/master/retrofit-converters
Would you be open to a PR to make JSON parsers configurable/optional?