abdulrehmanz / google-gson

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

Boolean values represented by "Y" and "N" are not deserialized properly #452

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am dealing with a feed that uses "Y" and "N" for boolean values.

For example:

{ "isConditionA": "Y",
"isConditionB": "N"
}

I am using version 2.2.1, which interprets both values as false.

I tried registering my own TypeAdapter but that is no longer allowed for 
primitives. 

I imagine it wouldn't be a big problem to support "Y" and "N" in the default 
Boolean deserializer.

Original issue reported on code.google.com by jflo...@phunware.com on 19 Jun 2012 at 9:24

GoogleCodeExporter commented 9 years ago
We now permit users to register their own type adapters for booleans. Check out 
the example in the test case.
http://code.google.com/p/google-gson/source/detail?r=1154

Original comment by limpbizkit on 30 Jun 2012 at 2:41