@Override
public String write( T value, JsonSerializationContext ctx ) throws JsonSerializationException {
JsonWriter writer = ctx.newJsonWriter();
try {
if ( ctx.isWrapRootValue() ) {
writer.beginObject();
writer.name( rootName );
getSerializer().serialize( writer, value, ctx );
writer.endObject();
} else {
getSerializer().serialize( writer, value, ctx );