Skip to content

Commit

Permalink
Update JSON.go
Browse files Browse the repository at this point in the history
  • Loading branch information
qtgolang committed Dec 20, 2023
1 parent f3e94c3 commit a510437
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/protobuf/JSON/JSON.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ func (s *SyJson) GetMap() map[string]any {
if b == nil {
return make(map[string]any)
}
return b["/"].(map[string]any)
c := b["/"]
if c == nil {
return make(map[string]any)
}
return c.(map[string]any)
}
func (s *SyJson) ToString() string {
return s.GetData("")
Expand Down

0 comments on commit a510437

Please sign in to comment.