@Override public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonMappingException { // 27-Nov-2009, tatu: As per [JACKSON-201] may or may not fail... if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } // But if it's fine, we'll just output empty JSON Object: jgen.writeStartObject(); jgen.writeEndObject(); }
@Override public final void serializeWithType(Object value, JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonGenerationException { if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } typeSer.writeTypePrefixForObject(value, jgen); typeSer.writeTypeSuffixForObject(value, jgen); }
@Override public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonMappingException { // 27-Nov-2009, tatu: As per [JACKSON-201] may or may not fail... if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } // But if it's fine, we'll just output empty JSON Object: jgen.writeStartObject(); jgen.writeEndObject(); }
@Override public final void serializeWithType(Object value, JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonGenerationException { if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } typeSer.writeTypePrefixForObject(value, jgen); typeSer.writeTypeSuffixForObject(value, jgen); }
@Override public final void serializeWithType(Object value, JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonGenerationException { if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } typeSer.writeTypePrefixForObject(value, jgen); typeSer.writeTypeSuffixForObject(value, jgen); }
@Override public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonMappingException { // 27-Nov-2009, tatu: As per [JACKSON-201] may or may not fail... if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } // But if it's fine, we'll just output empty JSON Object: jgen.writeStartObject(); jgen.writeEndObject(); }
@Override public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonMappingException { // 27-Nov-2009, tatu: As per [JACKSON-201] may or may not fail... if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } // But if it's fine, we'll just output empty JSON Object: jgen.writeStartObject(); jgen.writeEndObject(); }
@Override public final void serializeWithType(Object value, JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonGenerationException { if (provider.isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS)) { failForEmpty(value); } typeSer.writeTypePrefixForObject(value, jgen); typeSer.writeTypeSuffixForObject(value, jgen); }