Subject Re: xb2net using json.
From Andreas Gehrs-Pahl <>
Date Sat, 28 Sep 2019 18:01:14 -0400
Newsgroups xb2net


>when he should receive Andrés, I receive: Andr\u00e9s

You can use the Xbase++ function JsonDecode(cString). The UTF-8 "\u00e9"
character will be decoded as an OEM or ANSI character, depending on your
Character Set setting.

You can also use the Xbase++ function Json2Var() for more complex JSON data.

The Json*() functions were added to Xbase++ in Version 2.00.951.

Additionally, Xb2Net also has the xbJSON class and xbJSONParse() function
(since Version 3.6.00), but I'm not sure if they (automatically) handle
those "\uXXXX" encodings. I would assume that they do, but I'm not sure.

Finally, there are some other options, like Chilkat and OT4Xb, which also
have JSON handling and encoding/decoding functionality.

Hope that helps,

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927

Recent messages in this thread
-# xb2net using json. Guillermo <> 28-Sep-2019 04:10 pm
.-# Re: xb2net using json. (Current message) Andreas Gehrs-Pahl 28-Sep-2019 06:01 pm
..-# Re: xb2net using json. Guillermo <> 04-Oct-2019 04:58 pm
...\# Re: xb2net using json. Andreas Gehrs-Pahl 05-Oct-2019 08:11 pm