title: create a json string in perl
body: <p>I am trying to create a json string in perl that outputs something like this:</p>
  
  <pre><code>{"d":{"success":false, "error":"key is required"}}
  </code></pre>
  
  <p>I have figured out how to do it without the "d" using this example:</p>
  
  <pre><code>my %rec_hash = ('a' =&gt; 1, 'b' =&gt; 2, 'c' =&gt; 3, 'd' =&gt; 4, 'e' =&gt; 5);
  my $json = encode_json \%rec_hash;
  print "$json\n";
  </code></pre>
  
  <p>but not sure what I'm suppose to do with the extra level</p>