Here you can find the source of writeValueAsString(Object o)
public static String writeValueAsString(Object o) throws JsonProcessingException
//package com.java2s; //License from project: Apache License import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.*; public class Main { private static final ObjectMapper mapper = new ObjectMapper(); public static String writeValueAsString(Object o) throws JsonProcessingException { //String t = getObojectWriter().writeValueAsString(o) ; String t = mapper.writeValueAsString(o); return t; }//from www. j a va 2s . c o m }