1717// specific language governing permissions and limitations
1818// under the License.
1919
20+ import ballerina /data .jsondata ;
2021import ballerina /http ;
2122
2223public isolated client class Client {
@@ -69,7 +70,7 @@ public isolated client class Client {
6970 }
7071 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
7172 http : Request request = new ;
72- json jsonBody = payload . toJson ();
73+ json jsonBody = jsondata : toJson (payload );
7374 request .setPayload (jsonBody , " application/json" );
7475 return self .clientEp -> put (resourcePath , request , httpHeaders );
7576 }
@@ -121,7 +122,7 @@ public isolated client class Client {
121122 resourcePath = resourcePath + check getPathForQueryParam (queries );
122123 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
123124 http : Request request = new ;
124- json jsonBody = payload . toJson ();
125+ json jsonBody = jsondata : toJson (payload );
125126 request .setPayload (jsonBody , " application/json" );
126127 return self .clientEp -> put (resourcePath , request , httpHeaders );
127128 }
@@ -138,7 +139,7 @@ public isolated client class Client {
138139 }
139140 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
140141 http : Request request = new ;
141- json jsonBody = payload . toJson ();
142+ json jsonBody = jsondata : toJson (payload );
142143 request .setPayload (jsonBody , " application/json" );
143144 return self .clientEp -> post (resourcePath , request , httpHeaders );
144145 }
@@ -155,7 +156,7 @@ public isolated client class Client {
155156 }
156157 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
157158 http : Request request = new ;
158- json jsonBody = payload . toJson ();
159+ json jsonBody = jsondata : toJson (payload );
159160 request .setPayload (jsonBody , " application/json" );
160161 return self .clientEp -> put (resourcePath , request , httpHeaders );
161162 }
@@ -173,7 +174,7 @@ public isolated client class Client {
173174 }
174175 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
175176 http : Request request = new ;
176- json jsonBody = payload . toJson ();
177+ json jsonBody = jsondata : toJson (payload );
177178 request .setPayload (jsonBody , " application/json" );
178179 return self .clientEp -> put (resourcePath , request , httpHeaders );
179180 }
@@ -241,7 +242,7 @@ public isolated client class Client {
241242 }
242243 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
243244 http : Request request = new ;
244- json jsonBody = payload . toJson ();
245+ json jsonBody = jsondata : toJson (payload );
245246 request .setPayload (jsonBody , " application/json" );
246247 return self .clientEp -> post (resourcePath , request , httpHeaders );
247248 }
@@ -359,7 +360,7 @@ public isolated client class Client {
359360 }
360361 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
361362 http : Request request = new ;
362- json jsonBody = payload . toJson ();
363+ json jsonBody = jsondata : toJson (payload );
363364 request .setPayload (jsonBody , " application/json" );
364365 return self .clientEp -> post (resourcePath , request , httpHeaders );
365366 }
@@ -392,7 +393,7 @@ public isolated client class Client {
392393 }
393394 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
394395 http : Request request = new ;
395- json jsonBody = payload . toJson ();
396+ json jsonBody = jsondata : toJson (payload );
396397 request .setPayload (jsonBody , " application/json" );
397398 return self .clientEp -> post (resourcePath , request , httpHeaders );
398399 }
@@ -457,7 +458,7 @@ public isolated client class Client {
457458 }
458459 map < string | string []> httpHeaders = http : getHeaderMap (headerValues );
459460 http : Request request = new ;
460- json jsonBody = payload . toJson ();
461+ json jsonBody = jsondata : toJson (payload );
461462 request .setPayload (jsonBody , " application/json" );
462463 return self .clientEp -> put (resourcePath , request , httpHeaders );
463464 }
0 commit comments