It turns out that adding

@Override
public JavaType getType() {
    return TypeFactory.defaultInstance().constructType(String.class);
}

to my VirtualBeanPropertyWriter subclass fixed this.


On Fri, Oct 14, 2016 at 11:38 AM, Tatu Saloranta <t...@fasterxml.com> wrote:
> I don't think schema generation / type introspection aspects have been
> tested with virtual properties, so you are exploring uncharted territory
> here.
> Most likely some wiring is missing. As usual, a github issue with simple
> repo would be good way to go.
>
> -+ Tatu +-
>
>
> On Fri, Oct 14, 2016 at 6:12 AM, Benson Margulies <ben...@basistech.com>
> wrote:
>>
>> BeanProperty.getType() for this virtual property returns Object. is
>> there a way for me to fix up my property injection class to indicate
>> that it's a String?
>>
>>
>> On Fri, Oct 14, 2016 at 9:06 AM, Benson Margulies <ben...@basistech.com>
>> wrote:
>> > Sitting on one of my classes is:
>> >
>> > @JsonAppend(prepend = true, props = { @JsonAppend.Prop(value =
>> > VersionProperty.class, name = "version")})
>> >
>> > This causes https://github.com/mbknor to fail with an error about
>> > lacking an acceptJsonFormatVisitor for a custom serializer.
>> >
>> > I don't have an explicit custom serializer, is there some other way I
>> > could decorate this class to make this thing happy with me?
>>
>> --
>> 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 jackson-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to jackson-user@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 jackson-user+unsubscr...@googlegroups.com.
> To post to this group, send email to jackson-user@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to