Forum Discussion

jg's avatar
jg
Occasional Contributor
9 years ago

How to use ASCII characters in a JSON call?

Hello,

 

I am having trouble using ASCII characters in a JSON call. This is the format of a sample string:

You can see it uses [RS](Record Separator, [GS] (Group Separator), and [EOT] (End of Transmission).

When I copy/paste this string into SoapUI, the program doesn't understand these characters:

 

 

According to http://www.theasciicode.com.ar/ : [RS] = Alt + 30, [GS] = Alt + 29, [EOT] = Alt+ 04

However, they do not appear the same way in SoapUI, which causes the test to fail:

 

Is there a way to make SoapUI read these ASCII characters so the test can be run?

 

Regards,

 

Jesse

 

11 Replies

  • jg's avatar
    jg
    Occasional Contributor

    I found a  similar string in a notepad file with the correct  ASCII characters. I pasted that string into the program and it worked. The ASCII characters show up as a blank space in the program, but it reads the string correctly. So my problem is partially solved.

    However, I would still like to be able to enter these characters at-will and not have to paste them from another document. If there are any knowledgable people that have a solution, please post and I will mark the answer for others to see.

     

    Regards,

     

    Jesse

  • rupert_anderson's avatar
    rupert_anderson
    Valued Contributor

    Hi,

    I don't have anything to test against, but have you set the encoding in the TestStep properties:

    Does this do any good? Thought UTF-8 might allow the characters...

     

    Regards,

    Rupert

     

    • jg's avatar
      jg
      Occasional Contributor

      Rupert,

       

      I'm trying to find that menu you linked. The closest thing I could find is this:

      Test>Show Test Case Editor> Properties

       

       

      However I'm pretty confident that isn't where you are. Could you explain how to navigate to that menu?

       

      Regards,

       

      Jesse

      • rupert_anderson's avatar
        rupert_anderson
        Valued Contributor

        Hi Jesse,

         

        Its the TestStep's properties, highlight the REST Request TestStep then see the Request properties bottom left.Here's another screen shot:

        Hope it works,

         

        Rup

    • jg's avatar
      jg
      Occasional Contributor

      Rao,

       

      Thanks for the reply. Unfortunately Using Native L&F does not fix my problem. The characters still read as either blank spaces or question marks.

       

      Jesse

      • nmrao's avatar
        nmrao
        Champion Level 3
        Can you copy the text here? So that I can try? Is it possible to attach screen host after your changes?