@@ -24,11 +24,11 @@ Read Extended JSON
2424------------------
2525
2626You can read an Extended JSON string into an Ruby array by calling
27- the ``BSON::ExtJSON.parse() `` method. This method parses an Extended
27+ the ``BSON::ExtJSON.parse`` method. This method parses an Extended
2828JSON string and returns an array containing the data.
2929
3030The following example shows how you can read an Extended JSON string into a
31- array of hashes by using the ``parse() `` method:
31+ array of hashes by using the ``parse`` method:
3232
3333.. io-code-block::
3434 :copyable:
@@ -51,10 +51,9 @@ array of hashes by using the ``parse()`` method:
5151Write Extended JSON
5252-------------------
5353
54- You can write an Extended JSON string from a hash by using the
55- ``as_extended_json()`` method. By default, this method returns
56- the Extended JSON string in canonical format, but you can specify relaxed or
57- legacy formats by passing a ``mode`` argument.
54+ You can write an Extended JSON string by using the ``as_extended_json``
55+ method. By default, this method returns the Extended JSON string in canonical
56+ format, but you can specify relaxed or legacy formats by passing a ``mode`` argument.
5857
5958.. note:: Legacy Version
6059
@@ -65,9 +64,9 @@ legacy formats by passing a ``mode`` argument.
6564 For more information see, the :manual:`MongoDB Extended JSON v1
6665 </reference/mongodb-extended-json-v1/>` page in the Server manual.
6766
68- The following example outputs an Extended JSON string in the canonical, relaxed,
69- and legacy formats. It calls the ``as_extended_json()`` method from inside a
70- Ruby ``map{}`` block to create the Extended JSON string from an array of hashes:
67+ The ``as_extended_json`` method is available for many other core and
68+ standard library types. The following example creates Extended JSON strings in
69+ the canonical, relaxed, and legacy formats, from an array of hashes:
7170
7271.. io-code-block::
7372 :copyable:
@@ -94,8 +93,8 @@ For more information, see the following resources:
9493API Documentation
9594~~~~~~~~~~~~~~~~~
9695
97- - `BSON::ExtJSON.parse() <https://www.rubydoc.info/gems/bson/{+bson-version+}/BSON/ExtJSON#parse-class_method>`__
98- - `#as_extended_json() <https://www.rubydoc.info/gems/bson/{+bson-version+}/BSON/Hash #as_extended_json-instance_method>`__
96+ - `BSON::ExtJSON.parse <https://www.rubydoc.info/gems/bson/{+bson-version+}/BSON/ExtJSON#parse-class_method>`__
97+ - `#as_extended_json <https://www.rubydoc.info/gems/bson/{+bson-version+}/BSON/Array #as_extended_json-instance_method>`__
9998
10099Server Manual Pages
101100~~~~~~~~~~~~~~~~~~~
0 commit comments