code: public static BucketConfig parse(final String input, final ConfigParserEnvironment env, final NetworkAddress origin) {
          try {
              InjectableValues inject = new InjectableValues.Std()
                      .addValue("env", env)
                      .addValue("origin", origin == null ? NetworkAddress.localhost() : origin);
              return DefaultObjectMapper.reader()
                      .forType(BucketConfig.class)
                      .with(inject)
                      .with(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL)
                      .readValue(input);
          } catch (IOException e) {
              throw new CouchbaseException("Could not parse configuration", e);
          }
      }
docs: Parse a raw configuration into a {@link BucketConfig}.
  
  @param input the raw string input.
  @param env the environment to use.
  @param origin the origin of the configuration. If null / none provided then localhost is assumed.
  @return the parsed bucket configuration.