Skip to Content
0

How to send an array of JSON objects to SAP HANA Database via HTTP POST?

Jun 14, 2017 at 03:08 PM

140

avatar image
Former Member

I need to insert data into a SAP HANA database table via HTTP POST method using a REST client like Postman. For example, I want to insert the following JSON object:

<code>{"Id":"000034330","Name":"Albert","Type":"Customer"}

If I send just this object in the body of the HTTP POST request, it works fine. Although, instead of sending just one object at a time, I want to send an array of them. I tried the following format but it won't work:

<code>{"entry":[{"Id":"000034330","Name":"Albert","Type":"Customer"},{"Id":"000034331","Name":"John","Type":"Customer"}]}

Sending this format I get the following message as response:

<code>The serialized resource has an missing value for member 'Id'

How should I format the JSON objects array?

10 |10000 characters needed characters left characters exceeded

Please can you describe what service you are calling on server side (XSJS, OData,...) and how the implementation of the service is?

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers