After the options parameter is added to json_encode, the options parameter can be set to "Chinese" or "json_encodeoptions ".
Bytes ----------------------------------------------------------------------------------------------------
Header ('content-type: text/html; charset = UTF-8 '); $ a = 'China'; echo json_encode ($ a); // Before Version 5.3, output "\ u4e2d \ u6587" echo json_encode ($ a, JSON_UNESCAPED_UNICODE) without parameters; // "Chinese"
@ Blackeye poet
What is the options parameter of function (options) in the init attribute of the json object methods? No real parameters found from the entire page
Your understanding is wrong. This is JS Code. In fact, the built-in JS object is very small. Before you learn a programming method for a framework, measure the test taker's knowledge about the programming framework and JS features. You need to better understand the above Code under the object's JS.
(1) $. Extended (option, customoptions), from the Code itself, see, $. Extension is not defined here, so you cannot answer what it actually does. But the commonly used programming framework, such as jQuery, is mainly used to implement the attributes and methods of objects from customoptions to options objects. What you call "expansion ".
(2) JS type is weak or has no language restrictions. Therefore, this parameter can be an object of any type. Generally, it extends the composite object, including attributes and functions, it is normal for you to see that it is an object of the "extended" function or other features of "extended.
(3) select your code to define the object (when the object is defined by {} object), rather than JSON, JSON refers to the string expression of the object, and there is no string JSON format, you need to learn about the different definitions of JS Code and program compiling JSON strings. Therefore, through the definition of this function, but there is no JSON here.
Question about json_encode
This is not because the two Chinese characters after your encode are encoded in unicode format.
\ U5e0c \ u4e9a under the unicode encoding format.