Skip to content

Commit bf03f6d

Browse files
committed
Function docstrings
1 parent 2966d19 commit bf03f6d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ fn orjson(py: Python, m: &PyModule) -> PyResult<()> {
2727
Ok(())
2828
}
2929

30+
/// loads(obj, /)
31+
/// --
32+
///
33+
/// Deserialize JSON to Python objects.
3034
#[pyfunction]
3135
pub fn loads(py: Python, obj: PyObject) -> PyResult<PyObject> {
3236
let obj_ref = obj.as_ref(py);
@@ -49,6 +53,10 @@ pub fn loads(py: Python, obj: PyObject) -> PyResult<PyObject> {
4953
decode::deserialize(py, &val)
5054
}
5155

56+
/// dumps(obj, /)
57+
/// --
58+
///
59+
/// Serialize Python objects to JSON.
5260
#[pyfunction]
5361
pub fn dumps(py: Python, obj: PyObject) -> PyResult<PyObject> {
5462
encode::serialize(py, obj)

0 commit comments

Comments
 (0)