my %hash = ( rules => {name => '"required"', ...Just tried that but the property keys get surrounded by quotes in the JSON output.
The module is just faithfully converting your Perl data structure into a JSON one. Your Perl strings contain the double quotes, so the JSON ones do too. If you don't want that, strip the double quotes from the Perl strings before converting to JSON (or don't add them in the first place).
Update: Sorry, I thought you were talking about the extra quotes in the values, but you meant the keys. See replies below.
In reply to Re^3: Converting hash into js object properties
by haukex
in thread Converting hash into js object properties
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |