Skip to content

Transforms dates by default #2

@kalasjocke

Description

@kalasjocke

Hi,

When I have response containing a date on the form yyyy-mm-dd this is automatically transformed to a date, even without a proper Date.parse transformer.

I believe that it should be up to the developer to decide if the dates should be transformed or not, do you guys agree with me? And I also believe that this issue is created buy the Crack JSON parser, perhaps you can use another one if you? WebMock recently had the same problem, and they switched to their own version of Crack. See bblimke/webmock@772585e

This is an example of this behavior:

require 'crack/json'
puts Crack::JSON.parse('{"date":"2010-01-01"}')

Thanks for a great gem, looking forward to use this in my project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions