# ActiveSupport::JSON.decode issue

**URL:** <https://www.ruby-forum.com/t/activesupport-json-decode-issue/165373>\
**Category:** Rails\
**Created:** [April 13, 2009, 10:37am UTC](https://www.ruby-forum.com/t/activesupport-json-decode-issue/165373 "2009-04-13T10:37:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diabolic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e56c9b/32.png) [@diabolic](https://www.ruby-forum.com/u/diabolic)\
**Post date:** [April 13, 2009, 10:37am UTC](https://www.ruby-forum.com/t/activesupport-json-decode-issue/165373/1 "2009-04-13T10:37:50Z")

</div>

Good evening,

I’m having a rather odd JSON decoding issue when attempting to decode  
an RPX JSON response containing the profile data.

Using the command test = ActiveSupport::JSON.decode, passing it the  
string:

{“profile”:{“verifiedEmail”:“removed\_email\_address@domain.invalid”,“name”:  
{“formatted”:“Test Name”},“address”:{“country”:"United Kingdom  
"},“displayName”:“Test Name”,“preferredUsername”:“Test”,"url  
":“http:\/\/www.rubycaster.com\/”,“gender”:“male”,"utcOffset  
":“00:00”,“birthday”:“1971-02-10”,“providerName”:“MyOpenID”,  
“primaryKey”:“2”,“identifier”:"http:\/\/test.myopenid.com\/  
“,“email”:“removed\_email\_address@domain.invalid”},“stat”:“ok”}”

The command executes without any warning or exception. However when I  
run the following on IRB I get an odd result:

irb(main):085:0\> test[“profile”][“birthday”]  
=\> “19 1-02-10”

In the JSON string, if I replace “http:\/\/www.rubycaster.com\/”  
with just “http” everything works as expected and the value gets  
interpreted as an instance of the Date class.

Could someone help me find the right direction on this one? Rather  
lost 😉

Best regards,  
DBA

---

<div class="post-metadata">

**Author:** ![diabolic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e56c9b/32.png) [@diabolic](https://www.ruby-forum.com/u/diabolic)\
**Post date:** [April 13, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/activesupport-json-decode-issue/165373/2 "2009-04-13T18:21:55Z")

</div>

Update:

After dropping the ActiveSupport JSON decoder for the parser available  
at [http://json.rubyforge.org/](http://json.rubyforge.org/) everything started working as intended.

Best regards,  
DBA
