Skip to content

Commit 617a2cb

Browse files
committed
Remove extra references to JsonLoader class in docs. refs #46
1 parent 0f9dd3f commit 617a2cb

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

docs/index.rst

+16-4
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,23 @@ objects pass the URI to a callable, set with the keyword argument ``loader``.
154154
This callable must take the URI as an argument, and return the parsed JSON
155155
referred to by that URI.
156156

157-
The :class:`JsonLoader` class is provided to fill this role, and a default
158-
instance of it will be used for all refs unless a custom one is specified.
157+
The :func:`jsonloader` function is provided to fill this role. It handles http, https,
158+
and file references.
159+
160+
.. autofunction:: jsonloader
161+
162+
If you wish to pass extra arguments to :func:`json.loads` call, they can be passed
163+
through kwargs to this function. e.g.::
164+
165+
import decimal
166+
import functools
167+
168+
import jsonref
169+
170+
171+
loader = functools.partial(jsonref.jsonloader, parse_float=decimal.Decimal)
172+
result = jsonref.load_uri("https://my_doc_uri", loader=loader)
159173

160-
.. autoclass:: JsonLoader
161-
:members: __call__
162174

163175
Custom Loaders
164176
----------

0 commit comments

Comments
 (0)