make push to update MKWS docs on the main website
[mkws-moved-to-github.git] / doc / drupaljson.pl
diff --git a/doc/drupaljson.pl b/doc/drupaljson.pl
new file mode 100755 (executable)
index 0000000..0135867
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use JSON;
+
+local $/; # enable localized slurp mode
+my %rec_hash = ('body' => {'und' => [{'value' => <STDIN>}]});
+my $json = encode_json \%rec_hash;
+print $json;