fyhack / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Verbose, multi-line formatter for Gson (patch included) #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Included is a patch to add a verbose, multi-line, one value per line
formatter as discussed in issue 57
(http://code.google.com/p/google-gson/issues/detail?id=57).

The changes to GsonBuilder are just examples and will probably be entirely
different if setFormatter becomes public. I just included them to make the
formatter testable and to have atleast one way of using it myself.

Class names and such have not been really thought out, so feel free to
rename and mangle as much as you wish.

Let me know if there's a need for copyright assignment or such.

Original issue reported on code.google.com by nuutti.k...@gmail.com on 29 Mar 2009 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 143 has been merged into this issue.

Original comment by inder123 on 7 Aug 2009 at 10:48

GoogleCodeExporter commented 9 years ago
We will revisit print formatting in a future release. Meanwhile, you can use 
Gson.toJsonTree method and do the 
formatting yourself.

Original comment by inder123 on 29 Sep 2009 at 8:58

GoogleCodeExporter commented 9 years ago
The latest code in SVN does one-value-per-line formatting.

Original comment by limpbizkit on 3 Sep 2010 at 6:57