So I've hit a little snag trying to get model.KeyPair to serialize to
JSON (because this will make importing easier).
I keep getting the error as seen here:
https://gist.github.com/4081176
The problem is that it's trying to JSONify the PrivateKey and PublicKey
which makes sense from a default ObjectMapper. What I'd really like is
that it treat those as PEMEncoded bytes like we do when we serialize the
IdentityCertificate or EntitlementCertificate.
Now I was thinking this would require a custom serializer, but that
seemed heavy handed and smelled (my nose so stuffed I really didn't
smell anything) of overengineering because we haven't needed a custom
one so far.
Any thoughts on how best to serialize this to the manifest? Is the
custom serializer the best way? Or maybe add methods that return byte[]
and have jackson ignore the Private and Public key methods?
Thoughts?
jesus
--
jesus m. rodriguez | jesusr(a)redhat.com
principal software engineer | irc: zeus
red hat systems management | 919.754.4413 (w)
rhce # 805008586930012 | 919.623.0080 (c)
+---------------------------------------------+
| "Those who cannot remember the past |
| are condemned to repeat it." |
| -- George Santayana |
+---------------------------------------------+