MCPcopy Create free account
hub / github.com/LanceLRQ/deer-executor / ToJSON

Method ToJSON

client/message.go:24–29  ·  view source on GitHub ↗

ToJSON convert log record to json

(formated bool)

Source from the content-addressed store, hash-verified

22
23// ToJSON convert log record to json
24func (ccm CliCommonMessage) ToJSON(formated bool) string {
25 if formated {
26 return utils.ObjectToJSONStringFormatted(ccm)
27 }
28 return utils.ObjectToJSONString(ccm)
29}
30
31// NewCliCommonMessage to create a client comment message
32func NewCliCommonMessage(error bool, message string, data interface{}) CliCommonMessage {

Callers 1

PrintMethod · 0.95

Calls 2

ObjectToJSONStringFunction · 0.92

Tested by

no test coverage detected