public class PersistorToJSONFile extends PersistorToFileDelegate
{ "Response": { "StatusCode": "200", "Headers" : "{Date=Tue, 13 Dec 2016 03:32:13 GMT, Content-Length=4574, Content-Type=application/xml}", "EntityBody" : "<?xml version=\"1.0\"?><CUSTOMERList xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <CUSTOMER xlink:href=\"http://www.thomas-bayer.com/sqlrest/CUSTOMER/0/\">0</CUSTOMER> \n</CUSTOMERList>", "Request": { "Method": "GET", "Headers": "{Date=Tue, 06 Dec 2016 03:08:12 GMT, Content-Length=4574}" } } }NOTE: Be careful with the value occupying multiple lines, which should be escaped as characters \n; the double quote " should be escaped as \". The example is shown as above.
delegatePersistor
filename, ignoredFieldsForUnpickle, persistFile, reader, writer
runtime
Constructor and Description |
---|
PersistorToJSONFile(RuntimeDataInterface runtime,
java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
protected void |
instantiateDelegatePersitor()
Instantiate a concrete PersistorToString.
|
protected void |
writeHeader(Persistable persistable)
This is called before
PersistorToFile.write(Persistable) . |
protected void |
writeTailer(Persistable persistable)
This is called after
PersistorToFile.write(Persistable) . |
beforeUnpickle, doUnpickle, unpickle, write
equals, escape, getPersistenceName, getType, isIgnoredFiled, persist, stringNeedQuoted, unpersist
validate
public PersistorToJSONFile(RuntimeDataInterface runtime, java.lang.String filename)
runtime
- filename
- protected void instantiateDelegatePersitor()
PersistorToFileDelegate
PersistorToFileDelegate.PersistorToFileDelegate(RuntimeDataInterface, String)
.instantiateDelegatePersitor
in class PersistorToFileDelegate
protected void writeHeader(Persistable persistable) throws SAFSException, java.io.IOException
PersistorToFile
PersistorToFile.write(Persistable)
.writeHeader
in class PersistorToFile
SAFSException
java.io.IOException
protected void writeTailer(Persistable persistable) throws SAFSException, java.io.IOException
PersistorToFile
PersistorToFile.write(Persistable)
.writeTailer
in class PersistorToFile
SAFSException
java.io.IOException
Copyright © SAS Institute. All Rights Reserved.