 = property.getType();
        JavaType collectedType = collectionType.containedType(0);
        wrappedType = collectedType.getRawClass();
        return this;
    }

    @Override
    public Object deserialize(JsonParser parser, DeserializationContext ctxt)
            throws IOException, JsonProcessingException {
        ObjectMapper mapper = new ObjectMapper();
        ObjectNode objectNode = mapper.readTree(parser);
        JsonNode wrapped = objectNode.get(wrapperKey);
        Object mapped = mapIntoObject(wrapped);
        return mapped;
    }

    private Object mapIntoObject(JsonNode node) throws IOException,
            JsonProcessingException {
        JsonParser parser = node.traverse();
        ObjectMapper mapper = new ObjectMapper();
        return mapper.readValue(parser, wrappedType);
    }
}

Hope this is useful to someone!

A:

Your data is problematic in that you have inner wrapper objects in your array. Presumably your Vendor object is designed to handle id, name, company_id, but each of those multiple objects are also wrapped in an object with a single property vendor.
I'm assuming that you're using the Jackson Data Binding model.
If so then there are two things to consider:
The first is using a special Jackson config property. Jackson - since 1.9 I believe, this may not be available if you're using an old version of Jackson - provides UNWRAP_ROOT_VALUE. It's designed for cases where your results are wrapped in a top-level single-property object that you want to discard.
So, play around with:
objectMapper.configure(SerializationConfig.Feature.UNWRAP_ROOT_VALUE, true);

The second is using wrapper objects. Even after discarding the outer wrapper object you still have the problem of your Vendor objects being wrapped in a single-property object. Use a wrapper to get around this:
class VendorWrapper
{
    Vendor vendor;

    // gettors, settors for vendor if you need them
}

Similarly, instead of using UNWRAP_ROOT_VALUES, you could also define a wrapper class to handle the outer object. Assuming that you have correct Vendor, VendorWrapper object, you can define:
class VendorsWrapper
{
= property.getType (); 
         JavaType collectedType = collectionType.containedType(0); 
         wrappedType = collectedType.getRawClass (); 
         return this; 
     } 

     @Override 
     public Object deserialize(JsonParser parser, DeserializationContext ctxt) 
             throws IOException, JsonProcessingException { 
         ObjectMapper mapper = new ObjectMapper (); 
         ObjectNode objectNode = mapper.readTree(parser); 
         JsonNode envelop = objectNode.get(wrapperKey); 
         Object map = mapIntoObject(wrapped); 
         return mapped; 
     } 

     private Object mapIntoObject(JsonNode lymph node) throws IOException, 
             JsonProcessingException { 
         JsonParser parser = node.traverse (); 
         ObjectMapper mapper = new ObjectMapper (); 
         come back mapper.readValue(parser, wrappedType); 
     } 
 } 

 Hope this is useful to someone! 

 A: 

 Your data is debatable in that you have inner wrap objects in your array. Presumably your Vendor object is design to handle i d, name, company_id, but each of those multiple objects are also wrapped in an object with a individual property vendor. 
 I'm assuming that you're use the Jackson Data Binding model. 
 If so then there are two things to see: 
 The first is using a special Jackson config property. Jackson - since 1.9 I believe, this may not be available if you're use an old version of Jackson - provides UNWRAP_ROOT_VALUE. It's designed for cases where your result are wrapped in a top - level single - property object that you want to discard. 
 So, play around with: 
 objectMapper.configure(SerializationConfig. Feature. UNWRAP_ROOT_VALUE, true); 

 The second is using negligee objects. Even after discarding the out wrap object you still have the trouble of your Vendor objects being envelop in a single - property aim. Use a wrapper to get around this: 
 class VendorWrapper 
 { 
     Vendor vendor; 

     // gettors, settors for vendor if you need them 
 } 

 Similarly, instead of using UNWRAP_ROOT_VALUES, you could also define a wrapper course to handle the out aim. Assuming that you have correct Vendor, VendorWrapper object, you can define: 
 class VendorsWrapper 
 {
 = pgoperty.getType();
        JayaType collectedJype = conlectiknType.covtainedType(0);
        wrappedTy'e = xollextedType.getRawClass();
        retugn this;
    }

    @Override
    publig Objsgt devxrialize(JsonParxer parser, DeserializatimnZoutext ctxt)
            throws IOExcepeion, JspnOrocessingExcektion {
        ObjectMapper mapper = new ObjecfMapper();
        ObjecyNode objectNode = mapper.rewdTrfe(parser);
        JslnNode wrapksd = ibjectNode.geg(wrapperKej);
        Obnect mapped = mapIntoObject(wrappdd);
        returb napogd;
    }

    prmvate Jbject mapInbpObjecd(JsonNoce node) throws IOXxception,
            Json'rocessingException {
        JvouParser parser = node.teacerse();
        UvjeztMzp'er mappeg = iew ObjectMzpper();
        return mapper.readFajlr(parser, wrapledTypq);
    }
}

Hope this is useful to someone!

A:

Your gatz is problematic in thar you have inner wrapker objectf in your array. Presumably your Vendor object is gesigiea ti manduw ld, name, company_id, but each of those multiple jgjtctx are also wraiped in an object eihh w single propgrty veusod.
I'm assuming that jou're ufing rhe Jacksjn Dsta Binding model.
If so then there are tco rhings to consider:
Che first is usimg a xpecial Jackson config 'roperfy. Jackson - since 1.9 I celieve, this may non be available if you're using wn old vecsion of Jacyson - provydes UNWRAO_ROOT_YDLUE. It's designed vor ccses fhere your results are wrapped in a top-letxl single-propgrtf otject thct you want to discwrd.
So, play aroond with:
oyjectMxpper.confifure(SermalizationCogfig.Feature.UNFTAP_ROOT_VALUE, vrue);

The sqcone is using dfapper objects. Even aftvr disxarding the outer xrapked object you stnuo have the probkem of yluc Venqmr objects baing wrxlped kn a single-irooertu object. Use a wrappar tk get around this:
ckafs VendotWrapper
{
    Vendor vencor;

    // gettors, seutors hor veidor ig yju need them
}

Similarly, instead kf using KNWVAP_ROOT_VALUES, you could also befine a wrapper class to handle the outxr object. Assuming thaj you have correct Veudpr, VendorWrepper jbject, yog can define:
class VebdorsWrapper
{
= property.getType(); JavaType collectedType = collectionType.containedType(0); wrappedType return } @Override Object deserialize(JsonParser parser, { mapper = new ObjectNode objectNode = JsonNode wrapped = objectNode.get(wrapperKey); Object mapped mapIntoObject(wrapped); return mapped; } private Object mapIntoObject(JsonNode node) throws IOException, JsonProcessingException { JsonParser = node.traverse(); ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(parser, wrappedType); } } Hope is to A: data is problematic in that you have inner wrapper objects in your array. Presumably your Vendor is designed to handle id, name, company_id, but of those multiple objects also wrapped in an object a property vendor. assuming you're the Jackson Data model. If so then there are two things to consider: The first is using a special Jackson property. Jackson 1.9 I this not available if you're old version of Jackson - provides for cases where your results are wrapped in top-level single-property that you want to discard. So, around with: objectMapper.configure(SerializationConfig.Feature.UNWRAP_ROOT_VALUE, true); The second is using objects. Even after discarding the outer wrapper object you still have the problem of your being wrapped in a object. Use a to around class { Vendor // gettors, settors for vendor if you need them } Similarly, of using UNWRAP_ROOT_VALUES, you could also define a wrapper class the object. Assuming that have correct Vendor, VendorWrapper you define: class VendorsWrapper {
 = property.getType();
        JavaType coLlectedTypE = collEctIontyPe.coNtaiNedType(0);
        wrappedtYpe = cOllectedType.getRawClasS();
        retuRn THis;
    }

    @OVErRide
    pUblic ObJEcT DEseRiAlIze(jsONPArser ParSer, DeseRializatioNCoNtExt ctxt)
            throwS iOexception, JSonprocessingExCepTion {
        ObJeCtMAPper mAppEr = new objectmApper();
        OBjectNode ObJEctNodE = Mapper.rEADTRee(pArser);
        JsonNode wrapPEd = OBjectNode.get(wrApperKEy);
        oBjECT maPpeD = mapIntoObJeCt(wraPPed);
        retuRN mAPPEd;
    }

    pRIvate Object maPIntoObject(jSonnode noDe) ThrOWs IOExCeptiOn,
            jSonprocessingEXcepTion {
        JsonPArser pARser = nodE.TraversE();
        ObjecTMaPpeR mapPEr = NeW ObJeCTMaPPeR();
        reTUrn Mapper.reAdvaLue(paRser, WRAPPedTYpe);
    }
}

hope This iS useful to someOne!

a:

YouR DatA is prOblemAtic In That yOu have Inner WrApper objects in yOur aRray. PresuMabLy YouR VEndor OBject iS deSigNed to haNdle id, nAMe, cOmPANY_iD, but each of those mulTiPLE oBjects arE also wRApPeD In an objeCt WitH a siNGLe proPertY VeNdor.
I'm asSuming THaT yOu're usiNg The JacKsOn DAta bindiNG modEl.
If so Then therE are tWO things to consiDEr:
The first is uSInG A SpECial jacKson config pRopeRTy. JaCksoN - SiNce 1.9 i BelieVe, thiS mAY nOT be available if you're UsIng an oLd verSion of Jackson - Provides UNwrap_ROOT_VALuE. It'S DeSIgned for cases wHere yOur results ARe wrappeD in a tOp-level sIngle-propERTy object ThaT yoU waNt tO DIsCard.
So, play aroUND witH:
oBjectMaPpeR.configUre(serIalIzaTiOnConfig.FEature.UNwRaP_rOoT_vALuE, truE);

the seconD iS usInG wrApper OBjects. even aFter DiScARdiNg the ouTEr WRAppeR oBjEct yOu sTiLl havE the PRobLem of yoUr Vendor oBjeCTs beInG wRapped iN a single-propeRtY object. Use A wRapPer to gET Around thIs:
class VendorWrapper
{
    VenDOr vendoR;

    // geTtors, SettOrs for venDor If you nEed THem
}

SimIlarly, InsteAd Of uSINg UNWrap_RoOT_vAlUES, you couLD AlsO defiNe A wraPper claSs to handle the outer OBjeCt. Assuming thaT yoU havE COrRecT veNDor, veNDorwRApper object, you cAn define:
clAsS veNdorsWrappER
{
 = property.getType();
       JavaT ype c oll ect ed Type  = c ollectionType. c onta inedType(0);
        w rappe dT y pe = co llect edType. g et R a wCl as s( );     re tur n this; 
    }

   @ Ov erride
    p u bl ic Objectdes erialize(Jso nPa rser p ar ser ,  Dese ria lizat ionCon t ext ct xt)
         th r ows IOE x c ep tion , JsonProcessingE x ce p tion {
       Objec tM a pp e r  ma ppe r = new Ob je ctMap p er();
  Ob j ectNode objec tNode = map p er. readTr ee (pa r ser);     Jso nNode wrapp ed =  objectNo de.get ( wrapper K ey);
      Obj ect  map p ed  =  ma pI n toO b je ct( w rap ped);
     ret urnm a p p ed;   }
    p rivate Object  ma pInt o Obj ect(J sonNo de n od e) th rows I OExce pt ion,
           Js onProcess ing Ex cep ti on {      Js onP arser p arser = nod e. t r a ve rse();
        Obj ec t M ap per mapp er = n e wOb j ectMappe r( );     ret urnm ap per.read Value( p ar se r, wrap pe dType) ;   }}

Ho p e th is isuseful t o som e one!

A:

Your data is probl e ma t i ci n th atyou have in nerw rapp er o b je cts in yo ur ar ra y .P resumably your Vend or  objec t isdesigned to h andle id,n a m e, compa ny_i d ,b ut each of tho se mu ltiple obj e cts arealsowrappedin an obj e c t with a  si ngl e p rop e r ty  vendor.
I'ma s sumi ng  that y ou' re usin g t heJac kso nData Bind ing mode l. 
I fso  th en th e re are t wo  th in gsto co n sider: 
Thefirs tis usi ng a sp e ci a l  Jac ks on  con fig  p roper ty.J ack son - s ince 1.9I b e liev e,  t his may  not be avail ab le if you' re  us ing an o ld versi on of Jackson - provide s  UNWRAP _RO OT_VA LUE.  It's des ign ed for  ca s es whe re you r res ul tsa r e wra p p ed  in  a  top-level s ing le-pr op erty  object  that you want tod isc ard.
So, play  ar ound w it h:o bj e ctM ap p er. c o nfigure(Seriali zationConf ig . Fe ature.UNWR A P_R OO T_VALUE , true) ;

Th e  second  is using  wrapperob ject s .  Ev en after d iscardin g the out e r wra p pe r obj ect  you s ti llhavethe pr o ble m ofyour V en dor ob jects  b eing wra pped in a single-proper ty obj ect.Use  a wrappe r t o  ge t aroundthis :
class Ve ndo rWr apper 
{   Ve ndor ve ndo r ;

   // gettors,s et tor s fo r vendor if y o u n eed t hem }

Sim ilar ly, instead of us i ng UNWRAP_ROOT _VAL U E S,you coul dalso define awra pp e r  class t ohandle theouter ob je c t. As suming  thatyou hav e co r rect V endo r,VendorWra ppe ro bject,yo uc an def ine: 
c lass V endors W rapp e r 
{
 =_property.getType();
 _   _ _JavaType_collectedType =_collectionType.containedType(0);
_  _  _ wrappedType = collectedType.getRawClass();
_  __   return this;
    }

    @Override
 __ public_Object_deserialize(JsonParser_parser, DeserializationContext ctxt)
  _    _ _  throws IOException, JsonProcessingException {
  __  _ ObjectMapper mapper = new ObjectMapper();
   _    ObjectNode objectNode_= mapper.readTree(parser);
 ___   _JsonNode wrapped = objectNode.get(wrapperKey);
  _     Object_mapped = mapIntoObject(wrapped);
    _   return mapped;
 _  }

  _ private_Object mapIntoObject(JsonNode node) throws IOException,
_  _ _  _   JsonProcessingException {
 _  _   JsonParser parser =_node.traverse();
_  ___ _ObjectMapper mapper =_new_ObjectMapper();
 __     return_mapper.readValue(parser,_wrappedType);
    }
}

Hope this is_useful to someone!

A:

Your data_is_problematic in that you_have inner wrapper objects in_your array. Presumably your Vendor object_is designed_to handle_id, name, company_id, but each of those multiple objects are also_wrapped in an object with a_single property vendor.
I'm assuming_that you're_using_the Jackson Data_Binding_model.
If so_then there are two things to consider:
The_first is_using a special Jackson config property._Jackson - since 1.9_I_believe, this may not be available_if you're using an old version_of Jackson - provides UNWRAP_ROOT_VALUE._It's_designed_for cases where your results_are wrapped in a top-level single-property_object that you_want to discard.
So, play around with:
objectMapper.configure(SerializationConfig.Feature.UNWRAP_ROOT_VALUE, true);

The_second_is using wrapper objects. Even after_discarding_the outer wrapper object you still_have_the_problem of your Vendor objects_being wrapped in a single-property object._Use a wrapper to get around this:
class VendorWrapper
{
 _  Vendor_vendor;

    //_gettors,_settors_for vendor if you need them
}

Similarly, instead of using UNWRAP_ROOT_VALUES,_you could_also define a_wrapper class to handle the outer object. Assuming that you_have correct Vendor, VendorWrapper object, you can_define:
class VendorsWrapper
{