try using the angular.toJson function instead, it will insulate us from different browser implementations
http://docs.angularjs.org/api/ng/function/angular.toJson