Package org.jmol.util
Class JSONWriter
java.lang.Object
org.jmol.util.JSONWriter
- Direct Known Subclasses:
QCJSONWriter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected OC
void
void
arrayClose
(boolean andIndent) void
arrayOpen
(boolean andIndent) boolean
protected Object
getAndCheckValue
(Map<String, Object> map, String key) void
void
mapAddKeyValue
(String key, Object value, String terminator) void
mapAddKeyValueRaw
(String key, Object value, String terminator) Add a key:value pair where value is already quotedvoid
void
mapClose()
void
mapOpen()
void
setModifyKeys
(Map<String, String> mapNewToOld) void
void
setWhiteSpace
(boolean b) void
setWriteNullAsString
(boolean b) Set option to write a null as the string "null" or just null itself.void
writeArray
(Object o) void
void
void
void
void
void
void
writeString
(String str) void
writeString
(String str, SB sbSym)
-
Field Details
-
oc
-
indent
protected int indent
-
-
Constructor Details
-
JSONWriter
public JSONWriter()
-
-
Method Details
-
setModifyKeys
-
setWriteNullAsString
public void setWriteNullAsString(boolean b) Set option to write a null as the string "null" or just null itself.- Parameters:
b
-
-
append
-
setStream
-
closeStream
public boolean closeStream() -
writeObject
-
writeNull
public void writeNull() -
writeNumber
-
writeBoolean
-
writeString
-
writeString
-
writeMap
-
getAndCheckValue
-
mapOpen
public void mapOpen() -
mapClose
public void mapClose() -
mapAddKey
-
mapAddKeyValue
-
mapAddKeyValueRaw
Add a key:value pair where value is already quoted- Parameters:
key
-value
-terminator
- TODO
-
mapAddMapAllExcept
-
writeList
-
writeArray
-
arrayOpen
public void arrayOpen(boolean andIndent) -
arrayAdd
-
arrayClose
public void arrayClose(boolean andIndent) -
setWhiteSpace
public void setWhiteSpace(boolean b)
-