in reply to Re: Json epoch datetime with perl
in thread Json epoch datetime with perl

Agreed. It is just that I am treating that "\/Date(<epoch>)\/" as a basic string enclosed in double quotes. My problem is with those single backslashes getting replaces by double backslashes.

Replies are listed 'Best First'.
Re^3: Json epoch datetime with perl
by Anonymous Monk on May 28, 2014 at 09:20 UTC

    Agreed. It is just that I am treating that "\/Date(<epoch>)\/" as a basic string enclosed in double quotes. My problem is with those single backslashes getting replaces by double backslashes.

    Um no. In the OP you have double backslashes; you start with double backslashes;

    use JSON qw/ to_json /; my @fudge = "\/Date(<epoch>)\/"; print to_json( \@fudge ); __END__ ["/Date(<epoch>)/"]