Hey all, I have an internal SimpleModule which provides a custom serialiser for some types we use which works great when they're used as values, but not so much when they're keys in a map.
We're serialising out some internal Clojure data structures and keywords
toString() as `:test`, and our custom module corrects that to just `test`,
however, it seems when we have a map with say `:count -> 5`, I'm still seeing
`:count` being serialised.
Am I correct in that a `StdSerializer` only works on the value side of things?
I see in `DefaultSerializerProvider#_serialize`:
```java
private final void _serialize(JsonGenerator gen, Object value,
JsonSerializer<Object> ser, PropertyName rootName) throws IOException {
try {
gen.writeStartObject();
gen.writeFieldName(rootName.simpleAsEncoded(this._config));
ser.serialize(value, gen, this);
```
which doesn't seem to serialise the field name at all, is what I want actually
possible at all?
Cheers
Mark
---
"The ease with which a change can be implemented has no relevance at all to
whether it is the right change for the (Java) Platform for all time." —
Mark Reinhold.
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
--
You received this message because you are subscribed to the Google Groups
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/14904E1B-A733-4417-BA5D-D68F458E1576%40talios.com.
signature.asc
Description: OpenPGP digital signature
