Posted on September 12, 2020 at 11:52 am
You can correctly parse/convert these JSON unicode characters:
\u3048\u305F\u5834\u5408\u3001\u305D\u306E\u307E\u307E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u3068 |
Into their real UTF-8 characters like:
えた場合、そのままシリアライズすると |
procedure DecodeJsonUnicodeBytes(const sJson: String): String; var LJSONObject: TJSONObject; begin LJSONObject := nil; try LJSONObject := TJsonObject.Create; { convert String to JSON } LJSONObject.Parse(BytesOf(sJson), 0); { get the JSON as String } result := LJSONObject.ToString; finally LJSONObject.Free; end; end; |
Reference:
http://shankarjdelphi.blogspot.com/2019/03/delphi-json-parsing.html
Other Posts
- Set OpenVPN to Listed on a Specific IP Address
- Bash Trim Leading and Trailing Whitespace from a String
- Bash Get Name of Ethernet Network Interface
- VPN Providers with Dedicated Static IP Address
- OpenVPN Iptables Rules
- WireGuard VPN Iptables Rules
- How to Install WireGuard VPN in Debian 10 Buster
- Bash: No space left on device (inodes issue)
Updated Posts
- Add Desktop shortcut for all Windows PC users
- How to pass custom command-lien parameters in InnoSetup
- Programmatically create desktop icon with InnoSetup
- GeneratePress - a Lightweight WordPress Theme 2021
- InnoSetup disable DesktopIcon via command-line
- Use cURL to authenticate with JWT Bearer tokens
- Detect VMWare Virtual Machine
- Detect Microsoft Virtual PC Virtual Machine