Hi:
I had a problem converting a java BitSet to and from json. Here is my
code. Value of the bitset is not the same after I convert it to json
string, and then back to Object. Please help.
Chuang
Gson gson_ = new Gson();
BitSet set = new BitSet(10);
set.set(1);
set.set(5);
System.out.println(set.get(1));
System.out.println(set.get(5));
String output = gson_.toJson(set);
BitSet set2 = gson_.fromJson(output, BitSet.class);
System.out.println(set2.get(1));
System.out.println(set2.get(5));
--
You received this message because you are subscribed to the Google Groups "google-gson" group.
To post to this group, send email to
googl...@googlegroups.com.
To unsubscribe from this group, send email to
google-gson...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-gson?hl=en.