Convert the object to a json string. Returns: The object as a json string.
(self)
| 59 | extra = "allow" |
| 60 | |
| 61 | def json(self) -> str: |
| 62 | """Convert the object to a json string. |
| 63 | |
| 64 | Returns: |
| 65 | The object as a json string. |
| 66 | """ |
| 67 | from nextpy.utils.serializers import serialize |
| 68 | |
| 69 | return self.__config__.json_dumps(self.dict(), default=serialize) |
| 70 | |
| 71 | def set(self, **kwargs): |
| 72 | """Set multiple fields and return the object. |