Business process
Front end based on related business
1. String types for array-to-JSON
2. Base64_encode the JSON string
3. Submit Back-end
Now the problem is the front-end submission of the Base64, as long as with the Chinese, will become garbled, online to find some way is not a perfect solution, to solve the browser on the Base64 encryption and decryption after the Chinese garbled problem.
Reply content:
Business process
Front end based on related business
1. String types for array-to-JSON
2. Base64_encode the JSON string
3. Submit Back-end
Now the problem is the front-end submission of the Base64, as long as with the Chinese, will become garbled, online to find some way is not a perfect solution, to solve the browser on the Base64 encryption and decryption after the Chinese garbled problem.
JSON use UTF-8, you use Base64 code, after the service side do Base64 decoding, also as UTF-8 processing, if as GBK will be garbled.
Ps:base64 is not a cryptographic algorithm.