增加基础类型的动态提取

This commit is contained in:
2021-04-13 21:53:36 +08:00
parent 6a35eb1a9d
commit 89349705fd
3 changed files with 46 additions and 4 deletions

View File

@ -288,7 +288,7 @@ func (dj *DynamicJSON) createNode(parent *JSONode, key string, value interface{}
if nil == parent {
return errors.New("create node error : parent id nil")
}
_ = dj.lock.Lock("")
_ = dj.lock.Lock()
if parent.Child == nil {
parent.Child = make([]*JSONode, 0)
}
@ -310,7 +310,7 @@ func (dj *DynamicJSON) createNode(parent *JSONode, key string, value interface{}
}
parent.Child = append(parent.Child, newNode)
dj.nodeCnt++
_ = dj.lock.Unlock("")
_ = dj.lock.Unlock()
return nil
}