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
Subscribe to:
Posts (Atom)