类 JsonTool
java.lang.Object
org.apache.velocity.tools.generic.SafeConfig
org.apache.velocity.tools.generic.ImportSupport
org.apache.velocity.tools.generic.JsonTool
org.apache.velocity.tools.view.JsonTool
- 所有已实现的接口:
Serializable,Iterable
View version of
JsonTool. It adds an automatic parsing of the HTTP query
body content, if it is found to be of JSON type.- 从以下版本开始:
- VelocityTools 3.0
- 版本:
- $Id:$
- 作者:
- Claude Brisson
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 org.apache.velocity.tools.generic.ImportSupport
ImportSupport.SafeClosingHttpURLConnectionReader -
字段概要
从类继承的字段 org.apache.velocity.tools.generic.JsonTool
importSupport从类继承的字段 org.apache.velocity.tools.generic.ImportSupport
RESOURCE_KEY, URL_KEY, VALID_SCHEME_CHARS从类继承的字段 org.apache.velocity.tools.generic.SafeConfig
LOCK_CONFIG_KEY, log, LOGGER_NAME_KEY, SAFE_MODE_KEY, USE_CLASS_LOGGER_KEY -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidconfigure(ValueParser parser) Configuration.protected voidinitializeImportSupport(ValueParser config) Importsupport initializationprotected static booleanisJsonContentType(String contentType) Check if a given content type is of JSON typeprotected static booleanisJsonMimeType(String mimeType) Check if a given mime type is of JSON type从类继承的方法 org.apache.velocity.tools.generic.JsonTool
fetch, get, get, initJSON, initJSON, iterator, keys, keySet, parse, read, root, size, toString从类继承的方法 org.apache.velocity.tools.generic.ImportSupport
acquireLocalURLReader, acquireLocalURLString, acquireReader, acquireRemoteURLReader, acquireRemoteURLString, acquireString, getClasspathResource, getContentTypeAttribute, getFileResource, getProtocol, getResourceReader, getResourceString, isRemoteURL, setSafeMode从类继承的方法 org.apache.velocity.tools.generic.SafeConfig
configure, getLog, initLogger, isConfigLocked, isSafeMode, setLockConfig从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
构造器详细资料
-
JsonTool
public JsonTool()
-
-
方法详细资料
-
initializeImportSupport
Importsupport initialization- 覆盖:
initializeImportSupport在类中JsonTool- 参数:
config- configuration values
-
isJsonMimeType
Check if a given mime type is of JSON type- 参数:
mimeType- mime type- 返回:
- whether given mime type is of JSON type
-
isJsonContentType
Check if a given content type is of JSON type- 参数:
contentType- content type- 返回:
- whether given content type is of JSON type
-
configure
Configuration. Parses request body if appropriate.
-