@DefaultKey(value="json") @ValidScope(value="request") public class JsonTool extends JsonTool
JsonTool
. It adds an automatic parsing of the HTTP query
body content, if it is found to be of JSON type.ImportSupport.SafeClosingHttpURLConnectionReader
importSupport
RESOURCE_KEY, URL_KEY, VALID_SCHEME_CHARS
LOCK_CONFIG_KEY, log, LOGGER_NAME_KEY, SAFE_MODE_KEY, USE_CLASS_LOGGER_KEY
Constructor and Description |
---|
JsonTool() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure(ValueParser parser)
Configuration.
|
protected void |
initializeImportSupport(ValueParser config)
Importsupport initialization
|
protected static boolean |
isJsonContentType(String contentType)
Check if a given content type is of JSON type
|
protected static boolean |
isJsonMimeType(String mimeType)
Check if a given mime type is of JSON type
|
fetch, get, get, initJSON, initJSON, iterator, keys, keySet, parse, read, root, size, toString
acquireLocalURLReader, acquireLocalURLString, acquireReader, acquireRemoteURLReader, acquireRemoteURLString, acquireString, getClasspathResource, getContentTypeAttribute, getFileResource, getProtocol, getResourceReader, getResourceString, isRemoteURL, setSafeMode
configure, getLog, initLogger, isConfigLocked, isSafeMode, setLockConfig
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected void initializeImportSupport(ValueParser config)
initializeImportSupport
in class JsonTool
config
- configuration valuesprotected static boolean isJsonMimeType(String mimeType)
mimeType
- mime typeprotected static boolean isJsonContentType(String contentType)
contentType
- content typeprotected void configure(ValueParser parser)
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.