fix bug
This commit is contained in:
parent
86dca45d0b
commit
cdb68da336
@ -4,6 +4,13 @@ import org.json.JSONObject;
|
|||||||
|
|
||||||
public class JsonUtil {
|
public class JsonUtil {
|
||||||
public static String toString(Object o) {
|
public static String toString(Object o) {
|
||||||
|
if (o instanceof String) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
buffer.append("\"");
|
||||||
|
buffer.append(o);
|
||||||
|
buffer.append("\"");
|
||||||
|
return buffer.toString();
|
||||||
|
}
|
||||||
Object obj = JSONObject.wrap(o);
|
Object obj = JSONObject.wrap(o);
|
||||||
if (null != obj) {
|
if (null != obj) {
|
||||||
return obj.toString();
|
return obj.toString();
|
||||||
|
@ -126,7 +126,7 @@ class GroupManager {
|
|||||||
return _channel
|
return _channel
|
||||||
.invokeMethod('getGroupsInfo', _buildParam({'gidList': gidList}))
|
.invokeMethod('getGroupsInfo', _buildParam({'gidList': gidList}))
|
||||||
.then((value) {
|
.then((value) {
|
||||||
List list = _formatJson(value) ?? [];
|
List list = _formatJson(value);
|
||||||
return list.map((e) => GroupInfo.fromJson(e)).toList();
|
return list.map((e) => GroupInfo.fromJson(e)).toList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user