MCPcopy Create free account
hub / github.com/dagger/dagger / JSONValue

Method JSONValue

core/modfunc.go:311–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309}
310
311func (udp *UserDefaultPrimitive) JSONValue() (JSON, error) {
312 value, err := udp.Value()
313 if err != nil {
314 return nil, err
315 }
316 if jsonValue, ok := value.(JSON); ok {
317 return jsonValue, nil
318 }
319 jsonValue, err := json.Marshal(value)
320 if err != nil {
321 return nil, udp.errorf(err, "marshal to json")
322 }
323 return JSON(jsonValue), nil
324}
325
326func (udp *UserDefaultPrimitive) CallInput() (*FunctionCallArgValue, error) {
327 jsonValue, err := udp.JSONValue()

Callers 2

CallInputMethod · 0.95

Calls 4

ValueMethod · 0.95
errorfMethod · 0.95
JSONTypeAlias · 0.70
MarshalMethod · 0.65

Tested by

no test coverage detected