Closed ghost closed 8 years ago
There is some odd key mangling going on when there are two dates in a row. I have verified that with the 'json' gem, that this does not happen. Here is a short ruby script that demonstrates the issue:
require 'crack' require 'json' json_str = '{ "first_date": "2016-01-25", "second_date": "2016-01-25" }' puts JSON.pretty_generate(Crack::JSON.parse(json_str))
{ "first_date": "2016-01-25", "sec!!timestamp nd_date": "2016-01-25" }
Fixed by https://github.com/jnunemaker/crack/pull/57
There is some odd key mangling going on when there are two dates in a row. I have verified that with the 'json' gem, that this does not happen. Here is a short ruby script that demonstrates the issue:
require 'crack' require 'json' json_str = '{ "first_date": "2016-01-25", "second_date": "2016-01-25" }' puts JSON.pretty_generate(Crack::JSON.parse(json_str))
output
{ "first_date": "2016-01-25", "sec!!timestamp nd_date": "2016-01-25" }