Creates a {@link ParseContext} that will parse a given JSON input.

@param provider jsonProvider to use when parsing JSON
@return a parsing context based on given jsonProvider
198592
@Deprecated
    public static ParseContext using(JsonProvider provider) {
        return new ParseContextImpl(Configuration.builder().jsonProvider(provider).build());
    }
292273
public Map<String, T> parseMap(JsonParser jsonParser) throws IOException {
        HashMap<String, T> map = new HashMap<String, T>();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String key = jsonParser.getText();
            jsonParser.nextToken();
            if (jsonParser.getCurrentToken() == JsonToken.VALUE_NULL) {
                map.put(key, null);
            } else{
                map.put(key, parse(jsonParser));
            }
        }
        return map;
    }
1137727
@SuppressWarnings("resource")
    @Override
    protected HoconTreeTraversingParser _createParser(InputStream in, IOContext ctxt)
        throws IOException, JsonParseException
    {
        Reader r = _createReader(in, null, ctxt);
        return _createParser(r, ctxt);
    }
1076376
public void parseContext(Object contextLike) throws JsonLdError {
        Context context;
        if (api != null) {
            context = new Context(api.opts);
        } else {
            context = new Context();
        }
        // Context will do our recursive parsing and initial IRI resolution
        context = context.parse(contextLike);
        // And then leak to us the potential 'prefixes'
        final Map<String, String> prefixes = context.getPrefixes(true);

        for (final String key : prefixes.keySet()) {
            final String val = prefixes.get(key);
            if ("@vocab".equals(key)) {
                if (val == null || isString(val)) {
                    setNamespace("", val);
                } else {
                }
            } else if (!isKeyword(key)) {
                setNamespace(key, val);
                // TODO: should we make sure val is a valid URI prefix (i.e. it
                // ends with /# or ?)
                // or is it ok that full URIs for terms are used?
            }
        }
    }
330455
protected @Nonnull <T> Provider<T> getBeanProvider(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) {
        ArgumentUtils.requireNonNull("beanType", beanType);
        @SuppressWarnings("unchecked") BeanRegistration<T> beanRegistration = singletonObjects.get(new BeanKey(beanType, qualifier));
        if (beanRegistration != null) {
            return new ResolvedProvider<>(beanRegistration.bean);
        }

        Optional<BeanDefinition<T>> concreteCandidate = findConcreteCandidate(beanType, qualifier, true, false);
        if (concreteCandidate.isPresent()) {
            return new UnresolvedProvider<>(beanType, qualifier, this);
        } else {
            throw new NoSuchBeanException(beanType);
        }
    }
1263526
public B setProviderName(String provider) {
        set(AbstractContext.KEY_PROVIDER, Objects.requireNonNull(provider));
        return (B) this;
    }
555070
public void setProvider(String provider)
    {
        if (provider != null && provider.endsWith(".class"))
        {
            this.provider = provider.substring(0, provider.length() - 6);
        }
        this.provider = provider;
    }
824081
protected @Nonnull <T> Provider<T> getBeanProvider(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType) {
        return getBeanProvider(resolutionContext, beanType, null);
    }
1245826
@Nonnull
  public static ESuccess parseJson (@Nonnull @WillClose final Reader aReader,
                                    @Nonnull final IJsonParserHandler aParserHandler)
  {
    return parseJson (aReader, aParserHandler, (IJsonParserCustomizeCallback) null, (IJsonParseExceptionCallback) null);
  }
1194767
public <T> T parse(byte[] in, JsonReaderI<T> mapper) throws ParseException {
		this.base = mapper.base;
		this.in = in;
		this.len = in.length;
		return parse(mapper);
	}
502431
public static JsonWebKey fromEC(KeyPair keyPair, Provider provider) {

        ECPublicKey apub = (ECPublicKey) keyPair.getPublic();
        ECPoint point = apub.getW();
        ECPrivateKey apriv = (ECPrivateKey) keyPair.getPrivate();

        if (apriv != null) {
            return new JsonWebKey().withKty(JsonWebKeyType.EC).withCrv(getCurveFromKeyPair(keyPair, provider))
                    .withX(point.getAffineX().toByteArray()).withY(point.getAffineY().toByteArray())
                    .withD(apriv.getS().toByteArray()).withKty(JsonWebKeyType.EC);
        } else {
            return new JsonWebKey().withKty(JsonWebKeyType.EC).withCrv(getCurveFromKeyPair(keyPair, provider))
                    .withX(point.getAffineX().toByteArray()).withY(point.getAffineY().toByteArray())
                    .withKty(JsonWebKeyType.EC);
        }
    }
1150143
@Deprecated
    public static SslContext newClientContext(SslProvider provider) throws SSLException {
        return newClientContext(provider, null, null);
    }
669780
public <DPO> SingleDataProviderContext<DPO> read(DataProvider<DPO> dataProvider) {
        List<DataProvider<DPO>> addedDataProviders = new ArrayList<DataProvider<DPO>>();
        if (dataProvider != null) {
            addedDataProviders.add(dataProvider);
        }

        // Change context
        return new SingleDataProviderContext<DPO>(addedTriggers, addedDataProviders);
    }
871950
@FFDCIgnore(value = { Throwable.class })
    public static Object createJsonpProvider() {

        // We can only create the JSON-P provider if the jsonp feature is provisioned. This usually
        // requires the user to explicitly add the jsonp-1.0 feature in the server.xml (or some feature
        // that includes it).  The following classloading code checks to see if this bundle can load
        // (via dynamic import) the JSON-P classes.  If so, then it returns the JSON-P provider.  If not,
        // it returns null.
        Object provider = null;
        ClassLoader cl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {

            @Override
            public ClassLoader run() {
                return ProviderFactory.class.getClassLoader();
            }
        });
        Class<?> c = ProviderFactory.loadClass(cl, JSONPCLASS);
        if (c != null) {
            // Use reflection so that we do not load JSON classes if jsonp feature is not enabled.
            String className = "com.ibm.ws.jaxrs20.providers.jsonp.JsonPProvider";
            Class<?> pProviderCls = ProviderFactory.loadClass(cl, className);
            try {
                provider = pProviderCls.newInstance();
            } catch (Throwable ex) {
                String message = "Problem with creating the Jsonp provider " + className;
                if (ex.getMessage() != null) {
                    message += ": " + ex.getMessage();
                } else {
                    message += ", exception class : " + ex.getClass().getName();
                }
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, message);
                }
            }
        }

        return provider;
    }
1007550
public <T> T parse(Reader in, JsonReaderI<T> mapper) throws ParseException {
		this.base = mapper.base;
		//
		this.in = in;
		return super.parse(mapper);
	}
728552
public MultipleDataProviderContext<DPO> read(DataProvider<DPO> dataProvider) {
        if (dataProvider != null) {
            addedDataProviders.add(dataProvider);
        }

        // Change context
        return new MultipleDataProviderContext<DPO>(addedTriggers, addedDataProviders);
    }
935956
public RuleContext<D> read(final DataProvider<D>... dataProviders) {
        if (dataProviders != null) {
            Collections.addAll(registeredDataProviders, dataProviders);
        }
        return this;
    }