how do I parse a JSON string in Perl?
Note: I am a C++/Java/C# software engineer, not a Perl-wielding scripter.
I have fully read the JSON.pm "documentation" to find a working example, but those docs turned out to be complete and utter garbage".
I also read this post, but no one seems to know how to get the JSON key, value pairs out of the decoded perl variable.
Here is my script. Can someone help?
use JSON;
my $json_string = '{"foo": "bar"}';
my $decoded_json = decode_json($json_text);
print $decoded_json["foo"];
std::map<string, string> mymap = convert_to_cplusplus(decoded_json); # doesn't work
my asfjsa;fjsa;fwe # doesn't work
I got frustrated near the end.