class_docstr: Geocoder using the OpenCageData API.
  
  Documentation at:
      https://opencagedata.com/api
  
  .. versionchanged:: 2.2
      Improved error handling by using the default errors map
      (e.g. to raise :class:`.exc.GeocoderQuotaExceeded` instead of
      :class:`.exc.GeocoderQueryError` for HTTP 402 error)
class_docstr_tok: ["Geocoder","using","the","OpenCageData","API",".","Documentation","at",":","https",":","\/\/opencagedata.com\/api","..","versionchanged",":",":","2.2","Improved","error","handling","by","using","the","default","errors","map","(","e.g",".","to","raise",":","class",":","`",".exc.GeocoderQuotaExceeded","`","instead","of",":","class",":","`",".exc.GeocoderQueryError","`","for","HTTP","402","error",")"]
docstr: Returns location, (latitude, longitude) from json feed.
docstr_tok: ["Returns","location",",","(","latitude",",","longitude",")","from","json","feed","."]
code: def _parse_json(self, page, exactly_one=True):
      """Returns location, (latitude, longitude) from json feed."""
  
      places = page.get("results", [])
      if not len(places):
          self._check_status(page.get("status"))
          return None
  
      def parse_place(place):
          """Get the location, lat, lng from a single json place."""
          location = place.get("formatted")
          latitude = place["geometry"]["lat"]
          longitude = place["geometry"]["lng"]
          return Location(location, (latitude, longitude), place)
  
      if exactly_one:
          return parse_place(places[0])
      else:
          return [parse_place(place) for place in places]
  
file_path: geopy/geopy/geocoders/opencage.py
imports: from functools import partial
  from urllib.parse import urlencode
  from geopy.exc import GeocoderServiceError
  from geopy.geocoders.base import DEFAULT_SENTINEL, ERROR_CODE_MAP, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 4 for calling the OpenCage obj's underlying member method code with example usage: obj._parse_json(page, exactly_one) and returns: None, Location, parse_place, unknown