List of usage examples for com.fasterxml.jackson.core JsonGenerationException toString
public String toString()
From source file:can.yrt.oba.serialization.JacksonSerializer.java
public String serialize(Object obj) { StringWriter writer = new StringWriter(); JsonGenerator jsonGenerator;//from w w w. j a v a 2 s . co m try { jsonGenerator = new MappingJsonFactory().createJsonGenerator(writer); mMapper.writeValue(jsonGenerator, obj); return writer.toString(); } catch (JsonGenerationException e) { Log.e(TAG, e.toString()); return getErrorJson(ObaApi.OBA_INTERNAL_ERROR, e.toString()); } catch (JsonMappingException e) { Log.e(TAG, e.toString()); return getErrorJson(ObaApi.OBA_INTERNAL_ERROR, e.toString()); } catch (IOException e) { Log.e(TAG, e.toString()); return getErrorJson(ObaApi.OBA_IO_EXCEPTION, e.toString()); } }