The substring (3) the use of the http://www.w3school.com.cn/jsref/jsref_substring.asp
Possibility 1: if sb is the data to be converted, let’s say sb is a String
code>
The char code>
The STR [] = sb. ToString (). ToCharArray ();
code>
for
(
The int code>
i=
0
; i< str.length; i++){
code>
System.out.println(str[i]);
code>
}
After can get into an array of form, check the array before any Spaces, such as if useful
sb.toString().trim().substring(
1
); Cut off
code>
The String json = sb. ToString (). The trim (). The substring ( code>
1
);
code>
The // String json = "{\" success \ ": true, \" MSG \ ": \ \" successful "} ";
code>
System.out.println(json);
code>
System.out.println(json.length());
code>
The JSONObject JSONObject = JSONObject. FromObject (json. The trim ());
code>
System.out.println(jsonobject);
The
code>
"Result" : [{}] ------ left less {
Possibility 2: No initialization, no initBmob () is likely to report this wrong Unregistered
Possibility 3: There is an extra space before the data in the database
Reproduced in: https://www.cnblogs.com/wth21-1314/p/7381575.html