try { String jsonFilePath= "C:\\Users\\User-1\\Desktop\\ReqJSON\\student.json"; File jsonFile = new File(jsonFilePath); mapper.writeValue(jsonFile, student); } catch (JsonGenerationException ex) { ex.printStackTrace(); } catch (JsonMappingException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); }
Wednesday, 18 September 2013
Java Object to JSON String Convertor
Labels:
Jackson Json Mapping,
Tools & Utility
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment