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

Class JSONValue

sdk/python/src/dagger/client/gen.py:10395–10638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10393
10394@typecheck
10395class JSONValue(Type):
10396 async def as_array(self) -> list["JSONValue"]:
10397 """Decode an array from json"""
10398 _args: list[Arg] = []
10399 _ctx = self._select("asArray", _args)
10400 return await _ctx.execute_object_list(JSONValue)
10401
10402 async def as_boolean(self) -> bool:
10403 """Decode a boolean from json
10404
10405 Returns
10406 -------
10407 bool
10408 The `Boolean` scalar type represents `true` or `false`.
10409
10410 Raises
10411 ------
10412 ExecuteTimeoutError
10413 If the time to execute the query exceeds the configured timeout.
10414 QueryError
10415 If the API returns an error.
10416 """
10417 _args: list[Arg] = []
10418 _ctx = self._select("asBoolean", _args)
10419 return await _ctx.execute(bool)
10420
10421 async def as_integer(self) -> int:
10422 """Decode an integer from json
10423
10424 Returns
10425 -------
10426 int
10427 The `Int` scalar type represents non-fractional signed whole
10428 numeric values. Int can represent values between -(2^31) and 2^31
10429 - 1.
10430
10431 Raises
10432 ------
10433 ExecuteTimeoutError
10434 If the time to execute the query exceeds the configured timeout.
10435 QueryError
10436 If the API returns an error.
10437 """
10438 _args: list[Arg] = []
10439 _ctx = self._select("asInteger", _args)
10440 return await _ctx.execute(int)
10441
10442 async def as_string(self) -> str:
10443 """Decode a string from json
10444
10445 Returns
10446 -------
10447 str
10448 The `String` scalar type represents textual data, represented as
10449 UTF-8 character sequences. The String type is most often used by
10450 GraphQL to represent free-form human-readable text.
10451
10452 Raises

Callers 10

as_json_valueMethod · 0.70
as_jsonMethod · 0.70
fieldMethod · 0.70
new_booleanMethod · 0.70
new_integerMethod · 0.70
new_stringMethod · 0.70
with_contentsMethod · 0.70
with_fieldMethod · 0.70
jsonMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected