JsonToken t = p.nextToken(); if (_vanillaProcessing) { return finishBuild(ctxt, vanillaDeserialize(p, ctxt, t)); Object builder = deserializeFromObject(p, ctxt); return finishBuild(ctxt, builder); return finishBuild(ctxt, deserializeFromString(p, ctxt)); case JsonTokenId.ID_NUMBER_INT: return finishBuild(ctxt, deserializeFromNumber(p, ctxt)); case JsonTokenId.ID_NUMBER_FLOAT: return finishBuild(ctxt, deserializeFromDouble(p, ctxt)); case JsonTokenId.ID_EMBEDDED_OBJECT: return p.getEmbeddedObject(); case JsonTokenId.ID_TRUE: case JsonTokenId.ID_FALSE: return finishBuild(ctxt, deserializeFromBoolean(p, ctxt)); case JsonTokenId.ID_START_ARRAY: return finishBuild(ctxt, deserializeFromArray(p, ctxt)); case JsonTokenId.ID_FIELD_NAME: case JsonTokenId.ID_END_OBJECT: return finishBuild(ctxt, deserializeFromObject(p, ctxt)); default: return ctxt.handleUnexpectedToken(handledType(), p);
builder = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here return handlePolymorphic(p, ctxt, builder, unknown); builder = handleUnknownProperties(ctxt, builder, unknown); return _deserialize(p, ctxt, builder); handleIgnoredProperty(p, ctxt, handledType(), propName); continue; builder = creator.build(ctxt, buffer); } catch (Exception e) { builder = wrapInstantiationProblem(e, ctxt); return handlePolymorphic(null, ctxt, builder, unknown); return handleUnknownProperties(ctxt, builder, unknown);
@Override public JsonDeserializer<Object> unwrappingDeserializer(NameTransformer unwrapper) { /* main thing really is to just enforce ignoring of unknown * properties; since there may be multiple unwrapped values * and properties for all may be interleaved... */ return new BuilderBasedDeserializer(this, unwrapper); }
return deserializeWithUnwrapped(p, ctxt); return deserializeWithExternalTypeId(p, ctxt); return deserializeFromObjectUsingNonDefault(p, ctxt); injectValues(ctxt, bean); return deserializeWithView(p, ctxt, bean, view); bean = prop.deserializeSetAndReturn(p, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); handleUnknownVanilla(p, ctxt, bean, propName);
return deserializeWithUnwrapped(jp, ctxt); return deserializeWithExternalTypeId(jp, ctxt); return deserializeFromObjectUsingNonDefault(jp, ctxt); injectValues(ctxt, bean); return deserializeWithView(jp, ctxt, bean, view); bean = prop.deserializeSetAndReturn(jp, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); _anySetter.deserializeAndSet(jp, ctxt, bean, propName); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); handleUnknownProperty(jp, ctxt, bean, propName);
builder = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here return handlePolymorphic(p, ctxt, builder, tokens); return deserializeWithUnwrapped(p, ctxt, builder, tokens); handleIgnoredProperty(p, ctxt, handledType(), propName); continue; builder = creator.build(ctxt, buffer); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt);
bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here return handlePolymorphic(jp, ctxt, bean, unknown); bean = handleUnknownProperties(ctxt, bean, unknown); return _deserialize(jp, ctxt, bean); bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; // never gets here return handlePolymorphic(null, ctxt, bean, unknown); return handleUnknownProperties(ctxt, bean, unknown);
bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here handleIgnoredProperty(jp, ctxt, handledType(), propName); continue; bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; // never gets here
/** * Secondary deserialization method, called in cases where POJO * instance is created as part of deserialization, potentially * after collecting some or all of the properties to set. */ @Override public Object deserialize(JsonParser jp, DeserializationContext ctxt, Object builder) throws IOException, JsonProcessingException { /* Important: we call separate method which does NOT call * 'finishBuild()', to avoid problems with recursion */ return finishBuild(ctxt, _deserialize(jp, ctxt, builder)); }
public Object deserializeFromArray(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if (_delegateDeserializer != null) { try { Object bean = _valueInstantiator.createUsingDelegate(ctxt, _delegateDeserializer.deserialize(jp, ctxt)); if (_injectables != null) { injectValues(ctxt, bean); } return bean; } catch (Exception e) { wrapInstantiationProblem(e, ctxt); } } throw ctxt.mappingException(getBeanClass()); }
protected Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { // As per [databind#777], allow returning builder itself if (null == _buildMethod) { return builder; } try { return _buildMethod.getMember().invoke(builder, (Object[]) null); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt); } }
bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; // never gets here
handleIgnoredProperty(p, ctxt, handledType(), propName); continue; bean = creator.build(ctxt, buffer); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt);
@Override public Object deserializeFromObject(final JsonParser p, final DeserializationContext ctxt) throws IOException { return _underlyingBuilderBasedDeserializer.deserializeFromObject(p, ctxt); }
return deserializeWithUnwrapped(p, ctxt); return deserializeWithExternalTypeId(p, ctxt); return deserializeFromObjectUsingNonDefault(p, ctxt); injectValues(ctxt, bean); return deserializeWithView(p, ctxt, bean, view); bean = prop.deserializeSetAndReturn(p, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); handleUnknownVanilla(p, ctxt, bean, propName);
return deserializeWithUnwrapped(jp, ctxt); return deserializeWithExternalTypeId(jp, ctxt); return deserializeFromObjectUsingNonDefault(jp, ctxt); injectValues(ctxt, bean); return deserializeWithView(jp, ctxt, bean, view); bean = prop.deserializeSetAndReturn(jp, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); _anySetter.deserializeAndSet(jp, ctxt, bean, propName); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); handleUnknownProperty(jp, ctxt, bean, propName);
builder = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here return handlePolymorphic(p, ctxt, builder, tokens); return deserializeWithUnwrapped(p, ctxt, builder, tokens); handleIgnoredProperty(p, ctxt, handledType(), propName); continue; builder = creator.build(ctxt, buffer); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt);
bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here return handlePolymorphic(jp, ctxt, bean, unknown); bean = handleUnknownProperties(ctxt, bean, unknown); return _deserialize(jp, ctxt, bean); bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; // never gets here return handlePolymorphic(null, ctxt, bean, unknown); return handleUnknownProperties(ctxt, bean, unknown);
bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here handleIgnoredProperty(jp, ctxt, handledType(), propName); continue; bean = creator.build(ctxt, buffer); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; // never gets here
/** * Secondary deserialization method, called in cases where POJO * instance is created as part of deserialization, potentially * after collecting some or all of the properties to set. */ @Override public Object deserialize(JsonParser jp, DeserializationContext ctxt, Object builder) throws IOException, JsonProcessingException { /* Important: we call separate method which does NOT call * 'finishBuild()', to avoid problems with recursion */ return finishBuild(ctxt, _deserialize(jp, ctxt, builder)); }