'Add an empty object in a request payload in Karate testcase

How to insert a empty object in the request payload in karate . Need to send an empty emp object in the payload

Sample Payload

{"empInfo":{}}

Tried the syntax below, did not work.

  • set aReq.acctInfo == {};


Solution 1:[1]

It worked

  • set payload.empInfo = {};

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ramath