@Override public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException { set(instance, delegate.deserialize(p, ctxt)); }
@Override public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException { Object oldValue = _accessor.getValue(instance); Object newValue; // 20-Oct-2016, tatu: Couple of possibilities of how to proceed; for // now, default to "normal" handling without merging if (oldValue == null) { newValue = delegate.deserialize(p, ctxt); } else { newValue = delegate.deserializeWith(p, ctxt, oldValue); } if (newValue != oldValue) { // 18-Apr-2017, tatu: Null handling should occur within delegate, which may // set/skip/transform it, or throw an exception. delegate.set(instance, newValue); } }
Object id = property.deserialize(p, ctxt);
if (creatorProp != null) { if (buffer.assignParameter(creatorProp, creatorProp.deserialize(p, ctxt))) { try { builder = creator.build(ctxt, buffer); buffer.bufferProperty(prop, prop.deserialize(p, ctxt));
if (creatorProp != null) { if (buffer.assignParameter(creatorProp, creatorProp.deserialize(p, ctxt))) { try { bean = creator.build(ctxt, buffer); buffer.bufferProperty(prop, prop.deserialize(p, ctxt));
protected final Object _deserializeWithErrorWrapping(JsonParser p, DeserializationContext ctxt, SettableBeanProperty prop) throws IOException { try { return prop.deserialize(p, ctxt); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), prop.getName(), ctxt); // never gets here, unless caller declines to throw an exception return null; } }
@Override public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException { Object oldValue = _accessor.getValue(instance); Object newValue; // 20-Oct-2016, tatu: Couple of possibilities of how to proceed; for // now, default to "normal" handling without merging if (oldValue == null) { newValue = delegate.deserialize(p, ctxt); } else { newValue = delegate.deserializeWith(p, ctxt, oldValue); } // 23-Oct-2016, tatu: One possible complication here; should we always // try calling setter on builder? Presumably should not be required, // but may need to revise if (newValue != oldValue) { // 31-Oct-2016, tatu: Basically should just ignore as null can't really // contribute to merging. if (newValue != null) { return delegate.setAndReturn(instance, newValue); } } return instance; }
pending[pendingIx++] = prop.deserialize(p, ctxt); continue;
protected final Object _deserializeWithErrorWrapping(JsonParser p, DeserializationContext ctxt, SettableBeanProperty prop) throws IOException { try { return prop.deserialize(p, ctxt); } catch (Exception e) { return wrapAndThrow(e, handledType(), prop.getName(), ctxt); } }
@SuppressWarnings("resource") protected final Object _deserialize(JsonParser p, DeserializationContext ctxt, int index, String typeId) throws IOException { JsonParser p2 = _tokens[index].asParser(p); JsonToken t = p2.nextToken(); // 29-Sep-2015, tatu: As per [databind#942], nulls need special support if (t == JsonToken.VALUE_NULL) { return null; } TokenBuffer merged = new TokenBuffer(p, ctxt); merged.writeStartArray(); merged.writeString(typeId); merged.copyCurrentStructure(p2); merged.writeEndArray(); // needs to point to START_OBJECT (or whatever first token is) JsonParser mp = merged.asParser(p); mp.nextToken(); return _properties[index].getProperty().deserialize(mp, ctxt); }
if (creatorProp != null) { if (buffer.assignParameter(creatorProp, creatorProp.deserialize(p, ctxt))) { buffer.bufferProperty(prop, prop.deserialize(p, ctxt)); continue;
buffer.bufferProperty(prop, prop.deserialize(p, ctxt)); continue;
if (buffer.assignParameter(creatorProp, creatorProp.deserialize(p, ctxt))) { buffer.bufferProperty(prop, prop.deserialize(p, ctxt)); continue;
if (prop != null) { if (buffer.assignParameter(prop, prop.deserialize(p, ctxt))) {
if (prop != null) { if (buffer.assignParameter(prop, prop.deserialize(p, ctxt))) {
@Override public void deserializeAndSet(JsonParser jp, DeserializationContext ctxt, Object instance) throws IOException, JsonProcessingException { set(instance, _managedProperty.deserialize(jp, ctxt)); }
@Override public void deserializeAndSet(JsonParser jp, DeserializationContext ctxt, Object instance) throws IOException, JsonProcessingException { set(instance, _managedProperty.deserialize(jp, ctxt)); }
@Override public void deserializeAndSet(JsonParser jp, DeserializationContext ctxt, Object instance) throws IOException, JsonProcessingException { set(instance, _managedProperty.deserialize(jp, ctxt)); }
protected Object deserializeWithErrorWrapping(SettableBeanProperty creatorProp, JsonParser p, DeserializationContext ctxt, String propName) throws IOException { try { return creatorProp.deserialize(p, ctxt); } catch (IOException e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); // exception below will be throw only if someone overwrite default implementation of wrapAndThrow method throw e; } }
protected final Object _deserializeWithErrorWrapping(JsonParser p, DeserializationContext ctxt, SettableBeanProperty prop) throws IOException { try { return prop.deserialize(p, ctxt); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), prop.getName(), ctxt); // never gets here, unless caller declines to throw an exception return null; } }