Convert ArrayBuffer response to JSON
11,683
Maby you can use json-bufferify. It's a module to help you convert between JSON and ArrayBuffer, and you can run it in both Node.js and browser.
Comments
-
Vishnu almost 2 years
Here I am calling a GetFile , getting response as ArrayBuffer{} object, In network Tab response is {"errors":["photoProof Image is not available in the system"]}, if I do response.errors=undefined.
$scope.getDocuments = function(){ Myservice.downLoadDocument('photo', $scope.user.mobileNo). then(function(response){ }) }
If I Do this, getting below this value in Network Tab.
response.byteLength = 64
how do I convert this ArrayBuffer into proper JSON format?