Gson: Support InputStream

Created on 19 Mar 2015  路  1Comment  路  Source: google/gson

Please support InputStream and GZIPInputStream instead of String for 
gson.fromJson(response, listType);

Thanks, :-)

Original issue reported on code.google.com by david.jonathan.nelson on 22 Jan 2010 at 8:16

Priority-Medium Type-Defect auto-migrated

Most helpful comment

If you wrap your InputStream in an InputStreamReader, you're good!
  InputStream myInputStream = ...
  Reader reader = new InputStreamReader(myInputStream);
  gson.fromJson(reader, listType);

Original comment by limpbizkit on 20 Aug 2010 at 5:50

  • Changed state: WontFix

>All comments

If you wrap your InputStream in an InputStreamReader, you're good!
  InputStream myInputStream = ...
  Reader reader = new InputStreamReader(myInputStream);
  gson.fromJson(reader, listType);

Original comment by limpbizkit on 20 Aug 2010 at 5:50

  • Changed state: WontFix
Was this page helpful?
0 / 5 - 0 ratings

Related issues

priyankajagtap18 picture priyankajagtap18  路  14Comments

GoogleCodeExporter picture GoogleCodeExporter  路  32Comments

adiantek picture adiantek  路  23Comments

JakeWharton picture JakeWharton  路  39Comments

RobMans426 picture RobMans426  路  20Comments