B4J Question JSON with " characters etc

TomDuncan

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

B4X:
    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
 

TomDuncan

Active Member
Licensed User
Well, have just done some more tests and I am sorry.
It does allow for those characters
B4X:
<\/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
 
Top