Package org.nustaq.kson
Class KsonDeserializer
java.lang.Object
org.nustaq.kson.KsonDeserializer
parses kson format as well as json. somewhat quick&dirty, anyway targeted for easy mapping of config files/data and
to connect kontraktor's actors to slow-end tech like webservices & jscript front ends.
Note: this is pretty fuzzy code (typeguessing, best effort parsing ..)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanprotected KsonCharInputprotected KsonTypeMapperprotected Stack<org.nustaq.kson.KsonDeserializer.ParseStep>protected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisFromStringValue(Class type) protected booleanisIdPart(int ch) protected booleanisIdStart(int ch) booleanprotected StringreadId()protected Listprotected Listprotected longreadLong()protected StringreadNums()readObject(Class expect, Class genericKeyType, Class genericValueType) protected ListreadObjectFields(FSTClazzInfo targetClz) protected StringreadString(boolean quoted) protected Objectprotected StringsetArgTypesRessolver(KsonArgTypesResolver argTypesRessolver) voidskipWS()supportJSon(boolean supportJSon)
-
Field Details
-
DEBUG_STACK
public static boolean DEBUG_STACK -
in
-
mapper
-
stack
-
supportJSon
protected boolean supportJSon
-
-
Constructor Details
-
KsonDeserializer
-
-
Method Details
-
isSupportJSon
public boolean isSupportJSon() -
supportJSon
-
skipWS
public void skipWS() -
readObject
public Object readObject(Class expect, Class genericKeyType, Class genericValueType) throws Exception - Throws:
Exception
-
scanJSonType
-
readObjectFields
- Throws:
Exception
-
getArgTypesRessolver
-
setArgTypesRessolver
-
readList
- Throws:
Exception
-
readList
- Throws:
Exception
-
readValue
protected Object readValue(Class expected, Class genericKeyType, Class genericValueType) throws Exception - Throws:
Exception
-
isFromStringValue
-
readLong
protected long readLong() -
readString
-
readNums
-
readId
-
isIdPart
protected boolean isIdPart(int ch) -
isIdStart
protected boolean isIdStart(int ch)
-