Set json variable value to execution instance

Hi

I am using the REST api (https://docs.camunda.org/manual/7.6/reference/rest/process-instance/variables/post-variables/) to post variables to execution. Currently variable of type Json are showing as LinkedHashMap in cockpit. How can I post them as json objects?

I tried a couple of ways , like putting json string, but that sets the value to a string and not as json.

Tried using spin as well , as below (as given is spin example ):

 String json = "{\"name\" : \"jonny\","
			        + "\"address\" : {"
			          + "\"street\" : \"12 High Street\","
			          + "\"post code\" : 1234"
			          + "}"
			        + "}";
		JsonValue jsonValue = SpinValues.jsonValue(json).create();
		attribute.put("value",jsonValue);
	
		oneVariable.put(key, attribute);
		mainJson.put("modifications", oneVariable);
		mainJson.put("deletions",new JSONArray());

But this gives the error:
{"type":"JsonMappingException","message":"Unrecognized token 'Value': was expecting ('true', 'false' or 'null')\n at [Source: org.camunda.bpm.engine.rest.filter.EmptyBodyFilter$1$1@3c0fcca8; line: 1, column: 55] (through reference chain: org.camunda.bpm.engine.rest.dto.PatchVariablesDto[\"modifications\"])"}

Any suggestions will be appreciated.
Thanks in advance !