java - Generic type in a map codec for MongoDB -


given map<class1, class2>, want store in format:

[{     key: ** key encoded using class1 codec **,     value: ** value encoded using class2 codec** }, { ... }, { ... },  ... ] 

since it's supposed work class1 , class2, not know how implement mongodb codec, getencoderclass function (encode , decode not problem) far know, not handle generic types.

how can define , register such codec? or there easier way that?


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -