private static String b(Object paramObject) { SegmentedStringWriter localSegmentedStringWriter = new SegmentedStringWriter(b._getBufferRecycler()); try { JsonGenerator localJsonGenerator = b.createJsonGenerator(localSegmentedStringWriter); localJsonGenerator.writeStartObject(); localJsonGenerator.writeObjectField("params", paramObject); localJsonGenerator.writeEndObject(); localJsonGenerator.close(); return localSegmentedStringWriter.getAndClear(); } catch (IOException localIOException) { throw new RuntimeException(localIOException); } }
public String writeValueAsString(Object value, JsonSerialize.Inclusion inc) throws IOException, JsonGenerationException, JsonMappingException { if (inc == null) { return super.writeValueAsString(value); } // alas, we have to pull the recycler directly here... SegmentedStringWriter sw = new SegmentedStringWriter( _jsonFactory._getBufferRecycler()); writeValueWithConf(_jsonFactory.createJsonGenerator(sw), value, inc); return sw.getAndClear(); }
public String writeValueAsString(Object paramObject) throws IOException, JsonGenerationException, JsonMappingException { SegmentedStringWriter localSegmentedStringWriter = new SegmentedStringWriter(this._jsonFactory._getBufferRecycler()); _configAndWriteValue(this._jsonFactory.createJsonGenerator(localSegmentedStringWriter), paramObject); return localSegmentedStringWriter.getAndClear(); }
/** * Method that can be used to serialize any Java value as * a String. Functionally equivalent to calling * {@link #writeValue(Writer,Object)} with {@link java.io.StringWriter} * and constructing String, but more efficient. * * @since 1.3 */ public String writeValueAsString(Object value) throws IOException, JsonGenerationException, JsonMappingException { // alas, we have to pull the recycler directly here... SegmentedStringWriter sw = new SegmentedStringWriter(_jsonFactory._getBufferRecycler()); _configAndWriteValue(_jsonFactory.createJsonGenerator(sw), value); return sw.getAndClear(); }
public String writeValueAsString(Object paramObject) { SegmentedStringWriter localSegmentedStringWriter = new SegmentedStringWriter(this._jsonFactory._getBufferRecycler()); _configAndWriteValue(this._jsonFactory.createJsonGenerator(localSegmentedStringWriter), paramObject); return localSegmentedStringWriter.getAndClear(); }