B4J Question JSON with " characters etc

Discussion in 'B4J Questions' started by TomDuncan, Jun 29, 2015.

  1. TomDuncan

    TomDuncan Active Member Licensed User

    Hi,
    I need a way to send a json file but it may have characters like "

    Code:
    Dim m As Map
        m.Initialize
        m.Put(
    "action"0)
        m.Put(
    "send_to"0' All users
        m.Put("send_to_name","All")
        m.Put(
    "subject"" hi "all" error will be here"
        m.Put(
    "body"" lots here"
    As you can see if the subject had a value from a text field then the json parsing would be corrupt.
    Is my only way to send this with Base64 Encoding.
    If so how to I encode from a Base64 decoded string to a encoded string.

    Tom
     
  2. TomDuncan

    TomDuncan Active Member Licensed User

    Well, have just done some more tests and I am sorry.
    It does allow for those characters
    Code:
    <\/b><br><h3>Some Subject stuff<\/h1> <p>Some body stuff with \"this\"<br>
    Sorry for the query.
    It is too smart for me. lol
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice