Forum Discussion

Rivka's avatar
Rivka
Occasional Contributor
6 years ago

Transfer dollar sign as is in the Json request

Hi  I have a JSON that contains in body "$" and I should transfer it By POST Rest request as is. "value": "{\"container_procedures\":[{\"import\":{\"type\":\"LOAD\",\"json\":{\"file_path\":${PA...
  • richie's avatar
    richie
    6 years ago

    Hi Rivka 

     

    Ok - now I understand a little better - sorry - sometimes I don't read people's posts properly - so at the moment

    {
    "display": "TESTING",
    "value": "${PAPAYA_WORKING_DIR}"
    }

    is being transformed to 

    {
    "display": "TESTING",
    "value": ""
    }

    This is because ReadyAPI! is interpreting "${PAPAYA_WORKING_DIR}" as a parameter and I'm guessing it can't find what "${PAPAYA_WORKING_DIR}" represents - so it's blanking the value.

     

    stick another $ sign in there - so it reads as follows:

     

    {
    "display": "TESTING",
    "value": "$${PAPAYA_WORKING_DIR}"
    }

    this will generate 

    {
    "display": "TESTING",
    "value": "${PAPAYA_WORKING_DIR}"
    }

     

    cool?

     

    cheers,

     

    rich