Perl Create Json In Javascript