here is what I am doing:
I am taking a multidimensional array, or rather, an array of hashes and trying to pass it into a python script from my perl script. Currently I am converting it to json, and then passing the json string as a literal string into the python script as a parameter.
The array of hashes looks like the following example:
%HoH = (
id10001 => {
lat => "180",
long => "-180",
},
id10002 => {
lat => "180",
long => "-180",
},
id10003 => {
lat => "180",
long => "-180",
}
);
which i then inside of my perl script, turn into a json string:
{
"id10001": { "lat": "180", "lon": "-180" },
"id10002": { "lat": "180", "lon": "-180" },
"id10003": { "lat": "180", "lon": "-180" },
}
which then is passed into a python script. The python script decodes the json string back into the original constructed array structure.
Is there a better way to pass arrays, or multidimensional arrays from a perl script to a python scrip?
thank you in advance for your help