这里我调用GetFile,得到响应为ArrayBuffer {}对象,在网络中Tab响应是{“errors”:[“photoProof Image在系统中不可用”]},如果我做响应.errors = undefined
$scope.getDocuments = function(){
Myservice.downLoadDocument('photo', $scope.user.mobileNo).
then(function(response){
})
}
如果我这样做,请在“网络标签”中低于此值。
response.byteLength = 64
如何将此ArrayBuffer转换为正确的JSON格式?
答案 0 :(得分:2)
Maby你可以使用json-bufferify。它是一个帮助您在JSON和ArrayBuffer之间进行转换的模块,您可以在Node.js和浏览器中运行它。
答案 1 :(得分:0)
var jsonResult = JSON.parse(JSON.stringify(response));
会创造奇迹。