public interface JsonProvider extends OracleResourceProvider
A provider to create an OsonConverter for serialization
of Java objects to Oracle JSON (OSON) bytes and deserialization OSON bytes to
Java objects.
The
oracle.jdbc.provider.json
connection property identifies the name of a
JsonProvider implementation.
ServiceLoader locates implementations of
JsonProvider declared by a
META-INF/services/oracle.jdbc.spi.JsonProvider file in
the class path. Typically, this file is distributed within a jar file
that contains a JsonProvider implementation.
OracleResourceProvider.Parameter| Modifier and Type | Method and Description |
|---|---|
OsonConverter |
getOsonConverter(java.util.Map<OracleResourceProvider.Parameter,java.lang.CharSequence> parameterValues)
Returns an
OsonConverter to be used by Oracle JDBC for
conversions of Oracle JSON (OSON) bytes into Java objects, and vice versa. |
getName, getParametersOsonConverter getOsonConverter(java.util.Map<OracleResourceProvider.Parameter,java.lang.CharSequence> parameterValues)
Returns an OsonConverter to be used by Oracle JDBC for
conversions of Oracle JSON (OSON) bytes into Java objects, and vice versa.
Oracle JDBC will invoke this method when
Driver.connect(String, Properties) is called to open a new
Connection.
The parameterValues passed to this method is a Map
comprised as follows:
Parameter objects returned by an invocation of
OracleResourceProvider.getParameters() on this provider.
Map
contains the default value of that
Parameter, if any. If the parameter has no default value, then the
map does not contain an entry for that Parameter.
Map does not contain entries having null values.
parameterValues Map may contain a CharSequence
having a
security sensitive value. After this
method returns, the caller may wipe the contents of these
CharSequence values from memory. Implementations of this method
should not retain a reference to these CharSequence objects.
parameterValues - Parameters
configured by connection properties
. Not null. May be empty.java.lang.IllegalArgumentException - If the value of a parameter can not be
parsed or interpreted.java.lang.IllegalStateException - If an implementation-specific failure
prevents a resource from being provided.