Fix JSON serialisation problem with AJAX parent product selector. Based on 8affeda715b1facf12de1dab1d445bbe54616306