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
Post a Comment