File: pjx_JSON_out.pl

package info (click to toggle)
libcgi-ajax-perl 0.707-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 284 kB
  • sloc: perl: 1,669; makefile: 2
file content (23 lines) | stat: -rwxr-xr-x 286 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl -w

use strict;
use CGI; 
use JSON;
use Data::Dumper;

my $q = new CGI;


print $q->header(); 


my $val = $q->param('args');
my @vals = split(//, $val);


my $hash;
map { $hash->{$_} = chr(ord($_)+1) } @vals;

my $json = objToJson($hash);

print "var jsonObj = $json";