return null; return ctxt.handleUnexpectedToken(handledType(), JsonToken.START_ARRAY, p, null); return ctxt.handleUnexpectedToken(handledType(), p);
ctxt.reportBadDefinition(_beanType, String.format( "Invalid Object Id definition for %s: cannot find property with name '%s'", handledType().getName(), propName)); JsonFormat.Value format = findFormatOverrides(ctxt, property, handledType()); JsonFormat.Shape shape = null; if (format != null) {
delegateDeser.deserialize(p, ctxt)); return ctxt.handleMissingInstantiator(handledType(), getValueInstantiator(), p, "no suitable creator method found to deserialize from Number value (%s)", p.getNumberValue());
return ctxt.handleMissingInstantiator(handledType(), getValueInstantiator(), p, "no suitable creator method found to deserialize from Number value (%s)", p.getNumberValue());
return null; throw ctxt.mappingException(handledType(), JsonToken.START_ARRAY); throw ctxt.mappingException(handledType());
return null; throw ctxt.mappingException(handledType(), JsonToken.START_ARRAY); throw ctxt.mappingException(handledType());
return null; return ctxt.handleUnexpectedToken(handledType(), JsonToken.START_ARRAY, p, null); return ctxt.handleUnexpectedToken(handledType(), p);
return null; return ctxt.handleUnexpectedToken(handledType(), JsonToken.START_ARRAY, p, null); return ctxt.handleUnexpectedToken(handledType(), p);
ctxt.reportBadDefinition(_beanType, String.format( "Invalid Object Id definition for %s: cannot find property with name '%s'", handledType().getName(), propName)); JsonFormat.Value format = findFormatOverrides(ctxt, property, handledType()); JsonFormat.Shape shape = null; if (format != null) {
/** * Method called to deserialize POJO value from a JSON floating-point * number. */ @SuppressWarnings("incomplete-switch") public Object deserializeFromDouble(JsonParser p, DeserializationContext ctxt) throws IOException { switch (p.getNumberType()) { case FLOAT: // no separate methods for taking float... case DOUBLE: if (_delegateDeserializer != null) { if (!_valueInstantiator.canCreateFromDouble()) { Object bean = _valueInstantiator.createUsingDelegate(ctxt, _delegateDeserializer.deserialize(p, ctxt)); if (_injectables != null) { injectValues(ctxt, bean); } return bean; } } return _valueInstantiator.createFromDouble(ctxt, p.getDoubleValue()); } // actually, could also be BigDecimal, so: if (_delegateDeserializer != null) { return _valueInstantiator.createUsingDelegate(ctxt, _delegateDeserializer.deserialize(p, ctxt)); } throw ctxt.instantiationException(handledType(), "no suitable creator method found to deserialize from JSON floating-point number"); }
/** * Method called to deserialize POJO value from a JSON floating-point * number. */ @SuppressWarnings("incomplete-switch") public Object deserializeFromDouble(JsonParser p, DeserializationContext ctxt) throws IOException { switch (p.getNumberType()) { case FLOAT: // no separate methods for taking float... case DOUBLE: if (_delegateDeserializer != null) { if (!_valueInstantiator.canCreateFromDouble()) { Object bean = _valueInstantiator.createUsingDelegate(ctxt, _delegateDeserializer.deserialize(p, ctxt)); if (_injectables != null) { injectValues(ctxt, bean); } return bean; } } return _valueInstantiator.createFromDouble(ctxt, p.getDoubleValue()); } // actually, could also be BigDecimal, so: if (_delegateDeserializer != null) { return _valueInstantiator.createUsingDelegate(ctxt, _delegateDeserializer.deserialize(p, ctxt)); } throw ctxt.instantiationException(handledType(), "no suitable creator method found to deserialize from JSON floating-point number"); }
protected Object deserializeFromObjectUsingNonDefault(JsonParser p, DeserializationContext ctxt) throws IOException { final JsonDeserializer<Object> delegateDeser = _delegateDeserializer(); if (delegateDeser != null) { return _valueInstantiator.createUsingDelegate(ctxt, delegateDeser.deserialize(p, ctxt)); } if (_propertyBasedCreator != null) { return _deserializeUsingPropertyBased(p, ctxt); } // should only occur for abstract types... if (_beanType.isAbstract()) { return ctxt.handleMissingInstantiator(handledType(), p, "abstract type (need to add/enable type information?)"); } // 25-Jan-2017, tatu: We do not actually support use of Creators for non-static // inner classes -- with one and only one exception; that of default constructor! // -- so let's indicate it Class<?> raw = _beanType.getRawClass(); if (ClassUtil.isNonStaticInnerClass(raw)) { return ctxt.handleMissingInstantiator(raw, p, "can only instantiate non-static inner class by using default, no-argument constructor"); } return ctxt.handleMissingInstantiator(raw, p, "no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)"); }
delegateDeser.deserialize(p, ctxt)); return ctxt.handleMissingInstantiator(handledType(), p, "no suitable creator method found to deserialize from Number value (%s)", p.getNumberValue());
delegateDeser.deserialize(p, ctxt)); return ctxt.handleMissingInstantiator(handledType(), getValueInstantiator(), p, "no suitable creator method found to deserialize from Number value (%s)", p.getNumberValue());
if (idProp == null) { throw new IllegalArgumentException("Invalid Object Id definition for " +handledType().getName()+": can not find property with name '"+propName+"'");
if (idProp == null) { throw new IllegalArgumentException("Invalid Object Id definition for " +handledType().getName()+": can not find property with name '"+propName+"'");
throw ctxt.instantiationException(handledType(), "no suitable creator method found to deserialize from JSON integer number");
throw ctxt.instantiationException(handledType(), "no suitable creator method found to deserialize from JSON integer number");
return ctxt.handleMissingInstantiator(handledType(), p, "no suitable creator method found to deserialize from Number value (%s)", p.getNumberValue());
return ctxt.handleMissingInstantiator(handledType(), getValueInstantiator(), p, "no suitable creator method found to deserialize from Number value (%s)", p.getNumberValue());