MCPcopy
hub / github.com/tinode/chat / FromJSON

Function FromJSON

server/db/common/common.go:137–147  ·  view source on GitHub ↗

Deserialize JSON data from DB.

(src any)

Source from the content-addressed store, hash-verified

135
136// Deserialize JSON data from DB.
137func FromJSON(src any) any {
138 if src == nil {
139 return nil
140 }
141 if bb, ok := src.([]byte); ok {
142 var out any
143 json.Unmarshal(bb, &out)
144 return out
145 }
146 return nil
147}
148
149// Convert update to a list of columns and arguments.
150func UpdateByMap(update map[string]any) (cols []string, args []any) {

Callers 11

TopicsForUserMethod · 0.92
UserGetMethod · 0.92
UserGetAllMethod · 0.92
TopicGetMethod · 0.92
TopicsForUserMethod · 0.92
UsersForTopicMethod · 0.92
SubscriptionGetMethod · 0.92
SubsForTopicMethod · 0.92
FindMethod · 0.92
MessageGetAllMethod · 0.92
TestFromJSONFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFromJSONFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…