Package org.webpki.json
Class JSONDecoderCache
java.lang.Object
org.webpki.json.JSONDecoderCache
Stores
JSONDecoder classes for automatic instantiation during parsing.
This is (sort of) an emulation of XML schema caches.
The cache system assumes that JSON documents follow a strict convention:
{Message Context
"@context": ""Message Type Qualifier
"@qualifier": ""Arbitrary JSON Payload
.
.
.
}
Note: @qualifier is only required if multiple objects share the same @context.
A restriction imposed by this particular JSON processing model is that all properties must by default be read.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCache(Class<? extends JSONDecoder> jsonDecoder) voidaddToCache(String jsonDecoderPath) parse(byte[] jsonUtf8) parse(JSONObjectReader reader) voidsetCheckForUnreadProperties(boolean flag)
-
Field Details
-
CONTEXT_JSON
Emulation of XML namespace- See Also:
-
QUALIFIER_JSON
Emulation of XML top-level element. Optional- See Also:
-
-
Constructor Details
-
JSONDecoderCache
public JSONDecoderCache()
-
-
Method Details
-
parse
-
parse
-
addToCache
-
addToCache
-
setCheckForUnreadProperties
public void setCheckForUnreadProperties(boolean flag)
-