Class OJSONWriter
java.lang.Object
com.orientechnologies.orient.core.serialization.serializer.OJSONWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeginCollection(int iIdentLevel, boolean iNewLine, String iName) beginCollection(String iName) beginObject(int iIdentLevel) beginObject(int iIdentLevel, boolean iNewLine, Object iName) beginObject(Object iName) close()static ObjectendCollection(int iIdentLevel, boolean iNewLine) endObject(int iIdentLevel) endObject(int iIdentLevel, boolean iNewLine) flush()booleanprotected static voiditeratorToJSON(Iterator<?> it, String iFormat, StringBuilder buffer) static StringlistToJSON(Collection<? extends OIdentifiable> iRecords, String iFormat) static Stringstatic StringmapToJSON(Map<?, ?> iMap, String iFormat, StringBuilder buffer) voidnewline()voidsetPrettyPrint(boolean prettyPrint) voidwriteAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue) writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue, String iFormat) writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue, String iFormat, OType valueType) writeAttribute(String iName, Object iValue) writeObjects(int iIdentLevel, boolean iNewLine, String iName, Object[]... iPairs) writeObjects(String iName, Object[]... iPairs) writeRecord(int iIdentLevel, boolean iNewLine, Object iName, ORecord iRecord) writeValue(int iIdentLevel, boolean iNewLine, Object iValue) static StringwriteValue(Object iValue) static StringwriteValue(Object iValue, String iFormat) static StringwriteValue(Object iValue, String iFormat, int iIndentLevel, OType valueType)
-
Constructor Details
-
OJSONWriter
-
OJSONWriter
-
-
Method Details
-
writeValue
- Throws:
IOException
-
writeValue
- Throws:
IOException
-
writeValue
public static String writeValue(Object iValue, String iFormat, int iIndentLevel, OType valueType) throws IOException - Throws:
IOException
-
iteratorToJSON
protected static void iteratorToJSON(Iterator<?> it, String iFormat, StringBuilder buffer) throws IOException - Throws:
IOException
-
encode
-
listToJSON
-
mapToJSON
-
mapToJSON
-
beginObject
- Throws:
IOException
-
beginObject
- Throws:
IOException
-
beginObject
- Throws:
IOException
-
beginObject
- Throws:
IOException
-
writeRecord
public OJSONWriter writeRecord(int iIdentLevel, boolean iNewLine, Object iName, ORecord iRecord) throws IOException - Throws:
IOException
-
endObject
- Throws:
IOException
-
endObject
- Throws:
IOException
-
endObject
- Throws:
IOException
-
beginCollection
- Throws:
IOException
-
beginCollection
public OJSONWriter beginCollection(int iIdentLevel, boolean iNewLine, String iName) throws IOException - Throws:
IOException
-
endCollection
- Throws:
IOException
-
endCollection
- Throws:
IOException
-
writeObjects
- Throws:
IOException
-
writeObjects
public OJSONWriter writeObjects(int iIdentLevel, boolean iNewLine, String iName, Object[]... iPairs) throws IOException - Throws:
IOException
-
writeAttribute
- Throws:
IOException
-
writeAttribute
public OJSONWriter writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue) throws IOException - Throws:
IOException
-
writeAttribute
public OJSONWriter writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue, String iFormat) throws IOException - Throws:
IOException
-
writeAttribute
public OJSONWriter writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue, String iFormat, OType valueType) throws IOException - Throws:
IOException
-
writeValue
- Throws:
IOException
-
flush
- Throws:
IOException
-
close
- Throws:
IOException
-
append
- Throws:
IOException
-
isPrettyPrint
public boolean isPrettyPrint() -
setPrettyPrint
-
write
- Throws:
IOException
-
newline
- Throws:
IOException
-
resetAttributes
public void resetAttributes()
-