Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Json data with double backslashes to a single backslash Json data processing     - OGG-03510 Problem (Database)

- Java implementation chain store binary tree (Programming)

- Use GLOBK batch command network adjustment (Linux)

- Ubuntu root user profiles (Programming)

- Linux file permissions and access modes (Linux)

- FileZilla 3.10.1.1 install on Ubuntu 14.10 (Linux)

- How to contribute code on GitHub uploads (Linux)

- Why I do not like the Go language style interface (ie Structural Typing) (Programming)

- The FreeBSD zfs: failed with error 6 Error Resolution (Linux)

- Java Concurrency - multiple threads of HelloWorld (Programming)

- Java memory area Explanation (Programming)

- How to install Zephyr Test Management Tools on CentOS 7.x (Server)

- Ubuntu 14.10 installation SecureCRT 7.3 (Linux)

- Python decorators to learn and practice the actual usage scenarios (Programming)

- Linux find command to find files (Linux)

- Android 5.1 OTA package compilation error (Programming)

- Add your own kernel and ramfs based on an existing Linux LiveCD (Linux)

- MySQL database to open a remote connection method (Database)

- The most concise Systemd tutorial, just ten minutes (Linux)

- JDK comes with tools jinfo (Linux)

 
         
  Json data with double backslashes to a single backslash Json data processing
     
  Add Date : 2018-11-21      
         
         
         
  If you look at the title, you can only be the Oh Oh! I do not understand. Or the first description under the issues now. Here is the use of micro-channel interface returns some data. Because the string data contains html tags so that TX is the string data is encoded. All data is encoded by Unicode, and then kindeditor editor Chinese becomes \ u000a \ u0009 \ u000a \ u0009 text and some other birds.

In C #, which naturally becomes a \\ u000a \\ u0009 \\ u000a \\ u0009, by returning JSON methods for ASP.NET MVC: return Json ({rows = array of objects} new); will take the data object into Json since become \\\\ u000a \\\\ u0009 \\\\ u000a \\\\ u0009.

First, I want to handle calls replace function through the front JS. str.replace (/ \\\\ / g, '\\'); in short, a variety of have tried, are impossible.
Second, by a background process started directly with object attributes and unworkable. The reason is \\ u000a itself is a backslash, followed by the replacement will be \\ u000a.

Finally, the first obj serialized into a string, and then result = result.Replace (@ "\\", @ "\"); double backslash processing of data from a single \\\\ u000a \\\\ u0009 becomes \\ u000a \\ u0009. Then call return Json (new {rows = string});
The two are not the same as with the previous? NO, there is not the same thing, is the value of rows from the object into a string. This shows that the C # convert the object at the time would Json single backslash \\ \\ bars as dual blood processing, and the string does not.
     
         
         
         
  More:      
 
- CentOS6.5 installation Docker (Linux)
- Linux common network tools: ping host sweep (Linux)
- LAN Deployment Docker-- from scratch to create your own private warehouse Docker (Linux)
- Python: Finding meet the conditions specified in the file directory (Programming)
- Getting the Linux shell expr use (Programming)
- Forbid screen change the window size when creating a new window under CentOS (Linux)
- VMware Workstation virtual machine startup error: Could not open / dev / vmmon in CentOS 6 (Linux)
- Android HTTP request with Get Information (Programming)
- Based on a complete solution RMI service to transfer large files (Programming)
- Java, extends and implements Usage (Programming)
- C ++ How to determine the types of constants (Programming)
- Shell for loop (Programming)
- CentOS 6.4 under PXE + Kickstart unattended operating system installation (Programming)
- Oracle 11g can not export a variety of empty table solution (Database)
- Enable Intel Rapid Start in GNU / Linux (Linux)
- 20 Advanced Java interview questions summary (Programming)
- 8 Docker knowledge you may not know (Server)
- Install Jetty on CentOS / RHEL 6.X (Server)
- vector C ++ sequence containers (Programming)
- Python-- for anomalies and reflection of objects articles (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.