File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -260,12 +260,14 @@ Line 22-25:
260260 The resolved nodes have been added to the result set and are available to be used again later.
261261
262262Serialization
263- ----
263+ -------------
264264
265265Result objects can be converted to a dictionary, in the same format as the
266266Overpass API ``json `` output format.
267267
268268.. code-block :: pycon
269+ :linenos:
270+
269271 >>> import overpy, simplejson
270272 >>> api = overpy.Overpass()
271273 >>> result = api.query("[out:xml];node(50.745,7.17,50.75,7.18);out;")
@@ -280,6 +282,8 @@ numbers, and then parsing with ``Overpass.parse_json()``. The third-party
280282package ``simplejson `` works for this application:
281283
282284.. code-block :: pycon
285+ :linenos:
286+
283287 >>> result_str = simplejson.dumps(result.to_json())
284288 >>> new_result = api.parse_json(result_str)
285289 >>> assert len(result.nodes) == len(new_result.nodes)
You can’t perform that action at this time.
0 commit comments