def parse_json(document)
      JSON.parse(document).tap do |doc|
        if doc['_id'] && doc['_id']['$oid']
          doc['_id'] = BSON::ObjectId.from_string(doc['_id']['$oid'])
        end
      end
    end
def parse_json(document)
      JSON.parse(document).tap do |doc|
        if doc['_id'] && doc['_id']['$oid']
          doc['_id'] = BSON::ObjectId.from_string(doc['_id']['$oid'])
        end
      end
    end
Load a json document as a Hash and convert BSON-specific types.
 Replace the _id field as an BSON::ObjectId if it's represented as '$oid'.

 @example Parse a json document.
   Benchmarking.parse_json(document)

 @param [ Hash ] The json document.

 @return [ Hash ] An extended-json document.

 @since 2.2.3