class_docstr: What3Words geocoder using the V3 API.
  
  Documentation at:
      https://developer.what3words.com/public-api/docs
  
  .. versionadded:: 2.2
docstr: Parse type, words, latitude, and longitude and language from a
  JSON response.
docstr_tok: ["Parse","type",",","words",",","latitude",",","and","longitude","and","language","from","a","JSON","response","."]
code: def _parse_json(self, resources, exactly_one=True):
      """
      Parse type, words, latitude, and longitude and language from a
      JSON response.
      """
  
      error = resources.get("error")
  
      if error is not None:
          # https://developer.what3words.com/public-api/docs#error-handling
          exc_msg = (
              "Error returned by What3Words: %s"
              % resources["error"]["message"]
          )
          exc_code = error.get("code")
          if exc_code in ["MissingKey", "InvalidKey"]:
              raise exc.GeocoderAuthenticationFailure(exc_msg)
  
          raise exc.GeocoderQueryError(exc_msg)
  
      def parse_resource(resource):
          """
          Parse record.
          """
  
          if "coordinates" in resource:
              words = resource["words"]
              position = resource["coordinates"]
              latitude, longitude = position["lat"], position["lng"]
              if latitude and longitude:
                  latitude = float(latitude)
                  longitude = float(longitude)
  
              return Location(words, (latitude, longitude), resource)
          else:
              raise exc.GeocoderParseError("Error parsing result.")
  
      location = parse_resource(resources)
      if exactly_one:
          return location
      else:
          return [location]
  
imports: import re
  from functools import partial
  from urllib.parse import urlencode
  from geopy import exc
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 3 for calling the What3WordsV3 obj's underlying member method code with example usage: obj._parse_json(resources, exactly_one) and returns: location, list, Location