OSDN Git Service
(root)
/
bytom
/
bytom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
:art:Refine code (#1315)
[bytom/bytom.git]
/
common
/
list.go
diff --git
a/common/list.go
b/common/list.go
index
594a8a2
..
1fb138a
100644
(file)
--- a/
common/list.go
+++ b/
common/list.go
@@
-46,9
+46,7
@@
func (self *List) Get(i int) interface{} {
func (self *List) GetAsJson(i int) interface{} {
e := self.Get(i)
-
r, _ := json.Marshal(e)
-
return string(r)
}
@@
-74,8
+72,6
@@
func (self *List) ToJSON() string {
for i := 0; i < self.Length; i++ {
list = append(list, self.Get(i))
}
-
data, _ := json.Marshal(list)
-
return string(data)
}