in reply to Json epoch datetime with perl

JSON doesn't have a Date type, so you're not dealing with JSON format, so you don't want JSON module, you want something else, :)

Replies are listed 'Best First'.
Re^2: Json epoch datetime with perl
by gurpreetsingh13 (Scribe) on May 28, 2014 at 09:16 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.

      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>)/"]