| Issue 52: | Add 'Appendable' as a destination for Gson | |
| 4 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Currently, Gson can generate a String or write to a Writer. This can result in unnecessary temporary String objects when the user wants to embed Gson in a larger response. Both StringBuilder and Writer share a common interface however: Appendable. Since it is unlikely that the flush and close methods are called on Writer while serializing, consider either adding Appendable as a destination or replacing Writable with Appendable as the stream output type. |
||||||||||
,
Oct 06, 2008
Note that java.lang.Appendable first appeared in Java 1.5 |
|||||||||||
,
Oct 13, 2008
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
|
|||||||||||
,
Nov 26, 2008
Fixed in r315 Note that this breaks backwards binary compatibility while preserving backwards source compatibility. This is so because we changed the toJson() method signatures instead of adding new methods. However, since Appendable is a super class of Writer, a simple recompilation of code should be sufficient. Since this bug fix will go in a major release, this is acceptable.
Status: Fixed
|
|||||||||||
,
Nov 26, 2008
(No comment was entered for this change.)
Owner: inder123
|
|||||||||||
| ► Sign in to add a comment | |||||||||||