MCPcopy Create free account
hub / github.com/celery/celery / convert

Method convert

celery/bin/base.py:312–324  ·  view source on GitHub ↗
(self, value, param, ctx)

Source from the content-addressed store, hash-verified

310 name = "json array"
311
312 def convert(self, value, param, ctx):
313 if isinstance(value, list):
314 return value
315
316 try:
317 v = json.loads(value)
318 except ValueError as e:
319 self.fail(str(e))
320
321 if not isinstance(v, list):
322 self.fail(f"{value} was not an array")
323
324 return v
325
326
327class JsonObject(ParamType):

Callers

nothing calls this directly

Calls 1

failMethod · 0.45

Tested by

no test coverage detected