K klarsys Active Member Licensed User Longtime User Mar 24, 2015 #1 I have a string like below in Process_Globals of a service: B4X: Private settings As String = "{""debug"":""true""}" My code sends this JSON string to a server and it works well in Debug and Release builds. However, in Release (obfuscated) builds, the server claims to receive invalid JSON. It receives the above string as: B4X: {\"debug\":\"true\"} Is this a bug or should I write my JSON string differently? I can use JSONGenerator, but this is static string, so I used it this way.
I have a string like below in Process_Globals of a service: B4X: Private settings As String = "{""debug"":""true""}" My code sends this JSON string to a server and it works well in Debug and Release builds. However, in Release (obfuscated) builds, the server claims to receive invalid JSON. It receives the above string as: B4X: {\"debug\":\"true\"} Is this a bug or should I write my JSON string differently? I can use JSONGenerator, but this is static string, so I used it this way.
moster67 Expert Licensed User Longtime User Mar 24, 2015 #2 perhaps replace the double quotes with chr(34)? Just guessing....
Erel B4X founder Staff member Licensed User Longtime User Mar 24, 2015 #3 What is the output of Log(YourVariable) in release obfuscated mode?
K klarsys Active Member Licensed User Longtime User Mar 24, 2015 #4 Erel said: What is the output of Log(YourVariable) in release obfuscated mode? Click to expand... Settings: {\"debug\":\"true\"} In release mode: Settings: {"debug":"true"}
Erel said: What is the output of Log(YourVariable) in release obfuscated mode? Click to expand... Settings: {\"debug\":\"true\"} In release mode: Settings: {"debug":"true"}
K klarsys Active Member Licensed User Longtime User Mar 24, 2015 #5 moster67 said: perhaps replace the double quotes with chr(34)? Just guessing.... Click to expand... That helps!
moster67 said: perhaps replace the double quotes with chr(34)? Just guessing.... Click to expand... That helps!
Erel B4X founder Staff member Licensed User Longtime User Mar 25, 2015 #6 This bug is fixed for the next version.