Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
json文字列を返すperlスクリプトがあります。
$json = `/usr/bin/perl /var/www/private/data.pl`;
data.plは{"key1": "value1", "key2": "value2"}
{"key1": "value1", "key2": "value2"}
$ json変数のjson文字列にアクセスするための最良の方法は何ですか?
あなたに必要なのは
exec('/usr/bin/perl /var/www/private/data.pl',$jsonArray); $json = reset($jsonArray);