You can use Object Mapper, provided by com.fasterxml.jackson.core. There is a readValue which can convert string type object to any class object which you want.
Check this maven repo <http://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core/2.6.0-rc2> for the jar Thanks & Regards On Fri, Jun 19, 2015 at 2:43 AM, Nand Kumar Singh <[email protected]> wrote: > Rest Url : > http://localhost:8080//rest/hotel?{"location":"28.666045,77.185059","longitube":null,"latitude":null,"pincode":null,"childrens":0,"adults":1,"dateCheckIn":1434684600000,"dateCheckOut":1434724200000,"searchedString":"Sarai > Rohilla Railway Station, Railway Officers Colony, New Delhi, > India","marker":"1","city":"Delhi","rooms":0} > > > On Friday, 19 June 2015 02:24:27 UTC+5:30, Nand Kumar Singh wrote: >> >> How am i trying till now . >> >> @RequestMapping(value = "/rest/hotel", method = RequestMethod.GET) >> @Produces("application/json") >> @Consumes("application/json") >> public @ResponseBody List<HotelBO> search(JSONObject inputJsonObj) throws >> ParseException, IOException { >> >> Gson gson = new Gson(); >> GsonBuilder builder = new GsonBuilder(); >> Search vc = gson.fromJson(inputJsonObj.toString(), Search.class); >> *}* >> >> >> *but its not working any idea ?* >> >> -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > -- *Ankit Agarwal* *Software Engineer* *Seller **Platform* *Flipkart Internet Pvt. Ltd.* *Ph. No. +91-8095470278* -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
