discomarathon / google-gson

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

Output of single element String arrays not consistent with multi-element String arrays #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. String s = {"hello"};
2. new Gson().toJson(s);
Result: ["hello"]
Should be:  "[\"hello\"]"

1. String s = {"hello", "goodbye"};
2. new Gson().toJson(s);
Result: "[\"hello\",\"goodbye\"]" 
(correct)

What version of the product are you using? On what operating system?
1.2.2, Ubuntu

Please provide any additional information below.

Original issue reported on code.google.com by ehin...@gmail.com on 2 Apr 2009 at 1:29

GoogleCodeExporter commented 9 years ago
Uh, you mean, String[] s = {"hello"}, right?

Original comment by a.revolu...@gmail.com on 13 May 2009 at 11:03

GoogleCodeExporter commented 9 years ago
Yes

Original comment by ehin...@gmail.com on 13 May 2009 at 4:00

GoogleCodeExporter commented 9 years ago
I am unable to reproduce this issue.  Added tests in r458.

Original comment by joel.leitch@gmail.com on 29 Sep 2009 at 8:18

GoogleCodeExporter commented 9 years ago
Sorry, tests are in r459.

Original comment by joel.leitch@gmail.com on 29 Sep 2009 at 8:26