Closed yukideluxe closed 8 years ago
I also think that Dates should get parsed too, what do you think? I can change the PR and handle the parsing like here https://github.com/whichdigital/active-rest-client/blob/master/lib/active_rest_client/base.rb#L27-L30
@yukideluxe I think ActiveRestClient is pretty much abandonware. As the original author of most of the code, I forked it earlier this year to https://github.com/andyjeffries/flexirest. There have been a few fixes and new features since the fork (and nothing new this side). If you want to see if your change is still necessary and if so, raise it as a PR on there I'll see about accepting it.
I think this may have been fixed within https://github.com/andyjeffries/flexirest/pull/8 ?
Hello!
I found an issue when parsing a JSON response when some field includes a string with a iso8601 date in it (f.e
"hello this a string 2015-12-23T16:43:58+01:00"
)The condition
v.to_s[/\d{4}\-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})/]
allows it to continue to the parsing.DateTime
parsing is "nice" enough to detect this situation and the string gets parsed and converted to theDateTime
that contains, in my case the parsing was raising a "invalid date" exception because the string also had some weird data. In any case, I don't think we should parse the content in this situation. What do you think?Hope you like my solution!
Cheers,
Julia