code: public static <T> T parseValue(final String json, final Class<T> valueClass) {
      final JsonReader bsonReader = new JsonReader(json);
      bsonReader.readBsonType();
      return DEFAULT_CODEC_REGISTRY
          .get(valueClass)
          .decode(bsonReader, DecoderContext.builder().build());
    }
docs: Parses the provided extended JSON string and decodes it into a T value as specified by the
  provided class type. The type will decoded using the codec found for the type in the default
  codec registry. If the provided type is not supported by the default codec registry, the method
  will throw a {@link org.bson.codecs.configuration.CodecConfigurationException}.
  
  @param json the JSON string to parse.
  @param valueClass the class that the JSON string should be decoded into.
  @param <T> the type into which the JSON string is decoded.
  @return the decoded value.