{"action":"created","issue":{"url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/469","repository_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server","labels_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/469/comments","events_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/469/events","html_url":"https://github.com/openfoodfacts/openfoodfacts-server/issues/469","id":177382112,"number":469,"title":"JSON conversion error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) ","user":{"login":"stephanegigandet","id":8158668,"avatar_url":"https://avatars.githubusercontent.com/u/8158668?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanegigandet","html_url":"https://github.com/stephanegigandet","followers_url":"https://api.github.com/users/stephanegigandet/followers","following_url":"https://api.github.com/users/stephanegigandet/following{/other_user}","gists_url":"https://api.github.com/users/stephanegigandet/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanegigandet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanegigandet/subscriptions","organizations_url":"https://api.github.com/users/stephanegigandet/orgs","repos_url":"https://api.github.com/users/stephanegigandet/repos","events_url":"https://api.github.com/users/stephanegigandet/events{/privacy}","received_events_url":"https://api.github.com/users/stephanegigandet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-16T09:33:47Z","updated_at":"2016-09-16T09:35:25Z","closed_at":"2016-09-16T09:35:25Z","body":"This one is weird. The API is broken on OBF on the new server, but not on OFF which runs the same code.\r\n\r\nSoftware error:\r\n\r\nhash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /home/obf/lib/ProductOpener/Display.pm line 6972.\r\nFor help, please send mail to the webmaster (contact@openfoodfacts.org), giving this error message and the time and date of the error.\r\n\r\nThe corresponding line is:\r\n\r\nmy $data =  encode_json($request_ref->{structured_response});\r\n\r\nBut the structured_reponse is indeed an hashref:\r\n\r\n$VAR1 = {\r\n         'code' => '3178040678842',\r\n         'api_version' => '0',\r\n         'referer' => undef,\r\n         'json' => 1,\r\n         'structured_response' => {\r\n                                    'code' => '3178040678842',\r\n                                    'status_verbose' => 'product found',"},"comment":{"url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/comments/247558779","html_url":"https://github.com/openfoodfacts/openfoodfacts-server/issues/469#issuecomment-247558779","issue_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/469","id":247558779,"user":{"login":"stephanegigandet","id":8158668,"avatar_url":"https://avatars.githubusercontent.com/u/8158668?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanegigandet","html_url":"https://github.com/stephanegigandet","followers_url":"https://api.github.com/users/stephanegigandet/followers","following_url":"https://api.github.com/users/stephanegigandet/following{/other_user}","gists_url":"https://api.github.com/users/stephanegigandet/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanegigandet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanegigandet/subscriptions","organizations_url":"https://api.github.com/users/stephanegigandet/orgs","repos_url":"https://api.github.com/users/stephanegigandet/repos","events_url":"https://api.github.com/users/stephanegigandet/events{/privacy}","received_events_url":"https://api.github.com/users/stephanegigandet/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T09:35:24Z","updated_at":"2016-09-16T09:35:24Z","body":"Not sure if it's related to http://blogs.candoerz.com/question/125274/strange-behavior-of-a-tied-hash-in-perl-when-asking-for-an-arrayref.aspx\r\n\r\nBut switching to JSON::PP instead of JSON::XS does solve the problem.\r\n\r\n       M/ML/MLEHMANN/JSON-XS-3.02.tar.gz\r\n       /usr/local/lib/x86_64-linux-gnu/perl/5.20.2/JSON/XS.pm\r\n       Installed: 3.02\r\n       CPAN:      3.02  up to date"}}
{"actor":{"display_login":"stephanegigandet"}}