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

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -