perlquestion
iaw4
my data structure contains some regexs deep inside, and I am trying to convert this structure to json alas, I don't know how to convince JSON to play ball:
<code>
use JSON qw(-convert_blessed_universally);
my $test = qr/^[\w\@\.]+$/;
print to_json($test);
</code>
gives me an error
<pre>
encountered object '(?^:^[\w\@\.]+$)', but neither allow_blessed nor convert_blessed settings are enabled
</pre>
what is the proper syntax to get this going? advice appreciated.
<pre>
/iaw
</pre>