How to post JSON via Httpx with nested data?

Suppose I have such a request:

      let response = session.post("/some/path", 
      JSON.stringify({
          "someId": `${someId}`,
          "nestedData": `[{"key1":"value1","key2":"value2"}]`
      }));

What I expect:
Correctly formed JSON body.
What I got (in stdout logs):

{\"someId\":\"deadbeef-dead-dead-dead-beefbeefbeef\",\"nestedData\":\"[{\\\"key1\\\":\\\"value1\\\",\\\"key2\\\":value2}]\"}

As you can see there are triple backslashes
Are those even ok?
Because standard frameworks on SUT-backend (SpringBoot & com.fasterxml.jackson) are going crazy about it…
If I send post requests via JSON.stringify, but without nested data, there is no problem at all…

Hi @Crosby !

But what type you expected a nestedData to be? In other words, should it be an object or a string?

Have you tried to pass it to stringify that way (without `) if it’s an object?

JSON.stringify({
   "someId": `${someId}`,
   "nestedData": [{"key1":"value1","key2":"value2"}]
}));

Cheers