none
quotes on string RRS feed

  • Question

  • can anyone help me how can i use this as a string?

    {"ssid":"FYP_AccessPoint","secret":"diodemicrowave12","security":"WPA/WPA2","encrypted":"false"}
    Thursday, May 2, 2013 4:35 AM

Answers

  • Hi,

    double the quotes inside the string.

           Dim s As String = """hello"""

    One to start the string, two for the first " inside the string, the text, two for the last " inside the string, and one to end the string.

    Regards,

      Thorsten

    • Edited by Thorsten Gudera Thursday, May 2, 2013 4:54 AM
    • Marked as answer by featrick Thursday, May 2, 2013 5:31 AM
    Thursday, May 2, 2013 4:52 AM
  • Hi,

    double the quotes inside the string.

           Dim s As String = """hello"""

    One to start the string, two for the first " inside the string, the text, two for the last " inside the string, and one to end the string.

    Regards,

      Thorsten


    thanks man.. its works.. here the result..

    Dim code As String = "{""ssid"":""FYP_AccessPoint"",""secret"":""diodemicrowave12"",""security"":""WPA/WPA2"",""encrypted"":""false""}"""
            


    • Marked as answer by featrick Monday, May 6, 2013 12:52 PM
    Thursday, May 2, 2013 5:33 AM

All replies

  • Hi,

    double the quotes inside the string.

           Dim s As String = """hello"""

    One to start the string, two for the first " inside the string, the text, two for the last " inside the string, and one to end the string.

    Regards,

      Thorsten

    • Edited by Thorsten Gudera Thursday, May 2, 2013 4:54 AM
    • Marked as answer by featrick Thursday, May 2, 2013 5:31 AM
    Thursday, May 2, 2013 4:52 AM
  • "ssid:FYP_AccessPoint,secret:diodemicrowave12,security:WPA/WPA2,encrypted:false"

    What you show is not an array of strings, but one string


    Success
    Cor


    Thursday, May 2, 2013 4:58 AM
  • "ssid:FYP_AccessPoint,secret:diodemicrowave12,security:WPA/WPA2,encrypted:false"

    What you show is not an array of strings, but one string


    Success
    Cor


    its cannot be used because the other device reader should read the string like this..

    {"ssid":"FYP_AccessPoint","secret":"diodemicrowave12","security":"WPA/WPA2","encrypted":"false"}

    Thursday, May 2, 2013 5:12 AM
  • That was not in your original question. 

    Then take what Thorsten wrote. 

    Be aware 3 at the beginning and end and every time two in the middle. A two double quotes in VB is translated to one. A little bit like in C type languages two == means one equal operator. :-)


    Success
    Cor

    Thursday, May 2, 2013 5:16 AM
  • Hi,

    double the quotes inside the string.

           Dim s As String = """hello"""

    One to start the string, two for the first " inside the string, the text, two for the last " inside the string, and one to end the string.

    Regards,

      Thorsten


    thanks man.. its works.. here the result..

    Dim code As String = "{""ssid"":""FYP_AccessPoint"",""secret"":""diodemicrowave12"",""security"":""WPA/WPA2"",""encrypted"":""false""}"""
            


    • Marked as answer by featrick Monday, May 6, 2013 12:52 PM
    Thursday, May 2, 2013 5:33 AM