Re: [google-gson:2665]: Should JsonWriter be closed?

40 views
Skip to first unread message

Jake Wharton

unread,
Aug 13, 2018, 12:31:01 AM8/13/18
to googl...@googlegroups.com
No. That instance is shared. Feel free to send a PR and update the Javadoc of that method to indicate this.

On Fri, Aug 10, 2018, 12:23 PM <singlet...@gmail.com> wrote:
When implementing the TypeAdapter#write(JsonWriter out, T value) (currently using Gson version 2.8.4), does the implementation need to close the JsonWriter?  I realize that the objects need to be opened and closed, etc, but I am not seeing any guidance in the documentation as to whether or not the implementations are expected to do this.

Examples do not showing doing this.  I ran into this consideration when trying to nest TypeAdapters.

--
You received this message because you are subscribed to the Google Groups "google-gson" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-gson...@googlegroups.com.
To post to this group, send email to googl...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-gson.
For more options, visit https://groups.google.com/d/optout.

singlet...@gmail.com

unread,
Aug 13, 2018, 11:33:35 AM8/13/18
to google-gson
Great, thank you for the quick response!
Reply all
Reply to author
Forward
0 new messages