public class JsonObjectTranslator extends DocumentReferenceTranslator implements JsonTranslator
JSONABLE_TYPE
EMPTY_STRING
Constructor and Description |
---|
JsonObjectTranslator() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
fromJson(org.json.JSONObject json,
java.lang.String type) |
org.json.JSONObject |
toJson(java.lang.Object obj) |
java.lang.Object |
toObject(java.lang.String str,
java.lang.String type)
toObject converts String to DocumentReference,
whereas this methods deserializes to actual object
|
java.lang.String |
toString(java.lang.Object obj,
java.lang.String variableType)
toString converts DocumentReference to string,
whereas this method serializes the actual object to string
|
toObject, toString
getPackage, setPackage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createJsonable, getPackage
isDocumentReferenceVariable
public java.lang.Object toObject(java.lang.String str, java.lang.String type) throws TranslationException
DocumentReferenceTranslator
toObject
in class DocumentReferenceTranslator
str
- string representationtype
- document runtime typeTranslationException
public java.lang.String toString(java.lang.Object obj, java.lang.String variableType) throws TranslationException
DocumentReferenceTranslator
toString
in class DocumentReferenceTranslator
obj
- document objectvariableType
- declared variable typeTranslationException
public org.json.JSONObject toJson(java.lang.Object obj) throws TranslationException
toJson
in interface JsonTranslator
TranslationException
public java.lang.Object fromJson(org.json.JSONObject json, java.lang.String type) throws TranslationException
fromJson
in interface JsonTranslator
TranslationException
Copyright © 2019 CenturyLink, Inc.