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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCache
(Class<? extends JSONDecoder> jsonDecoder) void
addToCache
(String jsonDecoderPath) parse
(byte[] jsonUtf8) parse
(JSONObjectReader reader) void
setCheckForUnreadProperties
(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)
-