dumps#
- langchain_core.load.dump.dumps(obj: Any, *, pretty: bool = False, **kwargs: Any) str [source]#
Return a json string representation of an object.
- Parameters:
obj (Any) – The object to dump.
pretty (bool) – Whether to pretty print the json. If true, the json will be indented with 2 spaces (if no indent is provided as part of kwargs). Default is False.
kwargs (Any) – Additional arguments to pass to json.dumps
- Returns:
A json string representation of the object.
- Raises:
ValueError – If default is passed as a kwarg.
- Return type:
str
Examples using dumps