public class OJSONWriter extends Object
Constructor and Description |
---|
OJSONWriter(Writer out) |
OJSONWriter(Writer out,
String iJsonFormat) |
Modifier and Type | Method and Description |
---|---|
OJSONWriter |
append(String iText) |
OJSONWriter |
beginCollection(int iIdentLevel,
boolean iNewLine,
String iName) |
OJSONWriter |
beginCollection(String iName) |
OJSONWriter |
beginObject() |
OJSONWriter |
beginObject(int iIdentLevel) |
OJSONWriter |
beginObject(int iIdentLevel,
boolean iNewLine,
Object iName) |
OJSONWriter |
beginObject(Object iName) |
OJSONWriter |
close() |
static Object |
encode(Object iValue) |
OJSONWriter |
endCollection() |
OJSONWriter |
endCollection(int iIdentLevel,
boolean iNewLine) |
OJSONWriter |
endObject() |
OJSONWriter |
endObject(int iIdentLevel) |
OJSONWriter |
endObject(int iIdentLevel,
boolean iNewLine) |
OJSONWriter |
flush() |
boolean |
isPrettyPrint() |
protected static void |
iteratorToJSON(Iterator<?> it,
String iFormat,
StringBuilder buffer) |
static String |
listToJSON(Collection<? extends OIdentifiable> iRecords,
String iFormat) |
static String |
mapToJSON(Map<?,?> iMap) |
static String |
mapToJSON(Map<?,?> iMap,
String iFormat,
StringBuilder buffer) |
void |
newline() |
void |
resetAttributes() |
OJSONWriter |
setPrettyPrint(boolean prettyPrint) |
void |
write(String iText) |
OJSONWriter |
writeAttribute(int iIdentLevel,
boolean iNewLine,
String iName,
Object iValue) |
OJSONWriter |
writeAttribute(int iIdentLevel,
boolean iNewLine,
String iName,
Object iValue,
String iFormat) |
OJSONWriter |
writeAttribute(int iIdentLevel,
boolean iNewLine,
String iName,
Object iValue,
String iFormat,
OType valueType) |
OJSONWriter |
writeAttribute(String iName,
Object iValue) |
OJSONWriter |
writeObjects(int iIdentLevel,
boolean iNewLine,
String iName,
Object[]... iPairs) |
OJSONWriter |
writeObjects(String iName,
Object[]... iPairs) |
OJSONWriter |
writeRecord(int iIdentLevel,
boolean iNewLine,
Object iName,
ORecord iRecord) |
OJSONWriter |
writeValue(int iIdentLevel,
boolean iNewLine,
Object iValue) |
static String |
writeValue(Object iValue) |
static String |
writeValue(Object iValue,
String iFormat) |
static String |
writeValue(Object iValue,
String iFormat,
int iIndentLevel,
OType valueType) |
public OJSONWriter(Writer out)
public static String writeValue(Object iValue) throws IOException
IOException
public static String writeValue(Object iValue, String iFormat) throws IOException
IOException
public static String writeValue(Object iValue, String iFormat, int iIndentLevel, OType valueType) throws IOException
IOException
protected static void iteratorToJSON(Iterator<?> it, String iFormat, StringBuilder buffer) throws IOException
IOException
public static String listToJSON(Collection<? extends OIdentifiable> iRecords, String iFormat)
public static String mapToJSON(Map<?,?> iMap, String iFormat, StringBuilder buffer)
public OJSONWriter beginObject() throws IOException
IOException
public OJSONWriter beginObject(int iIdentLevel) throws IOException
IOException
public OJSONWriter beginObject(Object iName) throws IOException
IOException
public OJSONWriter beginObject(int iIdentLevel, boolean iNewLine, Object iName) throws IOException
IOException
public OJSONWriter writeRecord(int iIdentLevel, boolean iNewLine, Object iName, ORecord iRecord) throws IOException
IOException
public OJSONWriter endObject() throws IOException
IOException
public OJSONWriter endObject(int iIdentLevel) throws IOException
IOException
public OJSONWriter endObject(int iIdentLevel, boolean iNewLine) throws IOException
IOException
public OJSONWriter beginCollection(String iName) throws IOException
IOException
public OJSONWriter beginCollection(int iIdentLevel, boolean iNewLine, String iName) throws IOException
IOException
public OJSONWriter endCollection() throws IOException
IOException
public OJSONWriter endCollection(int iIdentLevel, boolean iNewLine) throws IOException
IOException
public OJSONWriter writeObjects(String iName, Object[]... iPairs) throws IOException
IOException
public OJSONWriter writeObjects(int iIdentLevel, boolean iNewLine, String iName, Object[]... iPairs) throws IOException
IOException
public OJSONWriter writeAttribute(String iName, Object iValue) throws IOException
IOException
public OJSONWriter writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue) throws IOException
IOException
public OJSONWriter writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue, String iFormat) throws IOException
IOException
public OJSONWriter writeAttribute(int iIdentLevel, boolean iNewLine, String iName, Object iValue, String iFormat, OType valueType) throws IOException
IOException
public OJSONWriter writeValue(int iIdentLevel, boolean iNewLine, Object iValue) throws IOException
IOException
public OJSONWriter flush() throws IOException
IOException
public OJSONWriter close() throws IOException
IOException
public OJSONWriter append(String iText) throws IOException
IOException
public boolean isPrettyPrint()
public OJSONWriter setPrettyPrint(boolean prettyPrint)
public void write(String iText) throws IOException
IOException
public void newline() throws IOException
IOException
public void resetAttributes()
Copyright © 2009–2020 OrientDB. All rights reserved.