Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Not able to send BLOB data from XSJS in form of JSON.

$
0
0

I have base64 data stored in my HANA table.

I need to send this data in form of JSON using XSJS.

 

I retrieve the base64 string from my database and construct an object as

as a key- value pair.

 

1. If I add this object directly to the response like $.response.setBody(object), it gives error saying that you cannot add complex objects. Convert it to string and then add.

 

2. If I try to stringify the object like $.response.setBody(JSON.stringify(object)), it shows empty key like     { "Pic" : {} }.

 

3. If I directly add the base64 string to the response body like $.response.setBody(base64String), it works. But i need in form of JSON

 

Can anyone help me with that??


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>