JWambaugh / TJSON

The tolerant JSON parser for Haxe
78 stars 25 forks source link

Unsupported field type: false #3

Closed theRemix closed 11 years ago

theRemix commented 11 years ago

noticed this odd behavior in tjson: [1.1.1]

var test = tjson.TJSON.parse('{
  object : customer,
  created : 1378868740,
  id : cus_2YAHJPoReA8KA8,
  livemode : false,
  description : test,
  email : null
}');

trace(test);
{ object : customer, created : 1378868740, id : cus_2YAHJPoReA8KA8, livemode : false, description : test, email : null }
trace(tjson.TJSON.encode(test));
uncaught exception: Unsupported field type: false

in file: /deploy/lib/tjson/TJSON.class.php line 315
#0 /deploy/lib/tjson/TJSON.class.php(274): tjson_TJSON::encodeValue(false, Object(tjson_SimpleStyle), 0)

using php if that helps any

JWambaugh commented 11 years ago

Thanks for reporting this! This bug is now fixed in version 1.1.3, and I added your example to the unit tests as well.