コード例 #1
0
 protected JsonSchema propertySchema(BeanProperty prop) throws JsonMappingException {
   if (prop == null) {
     throw new IllegalArgumentException("Null property");
   }
   SchemaFactoryWrapper visitor = wrapperFactory.getWrapper(getProvider());
   JsonSerializer<Object> ser = getSer(prop);
   if (ser != null) {
     JavaType type = prop.getType();
     if (type == null) {
       throw new IllegalStateException("Missing type for property '" + prop.getName() + "'");
     }
     ser.acceptJsonFormatVisitor(visitor, type);
   }
   return visitor.finalSchema();
 }
コード例 #2
0
 @Override
 public KeyDeserializer createContextual(DeserializationContext ctxt, BeanProperty property)
     throws JsonMappingException {
   return new ContextualDeser((property == null) ? "ROOT" : property.getName());
 }