Package manifold.json.rt.api
Class Writer
- java.lang.Object
-
- manifold.json.rt.api.Writer
-
public class Writer extends Object
This class is used as part of the JSON API. It defines methods to write this JSON object in various forms of formatted text including JSON, YAML, CSV, and XML.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoCsv()Serializes this instance to an CSV formatted StringvoidtoCsv(Appendable target)StringtoCsv(String name)Serializes this instance to a CSV formatted StringStringtoJson()Serializes this instance to a JSON formatted StringvoidtoJson(Appendable target)StringtoXml()Serializes this instance to an XML formatted StringvoidtoXml(Appendable target)StringtoXml(String name)Serializes this instance to an XML formatted StringStringtoYaml()Serializes this instance to a YAML formatted StringvoidtoYaml(Appendable target)
-
-
-
Method Detail
-
toJson
public String toJson()
Serializes this instance to a JSON formatted String- Returns:
- This instance serialized to a JSON formatted String
-
toJson
public void toJson(Appendable target)
-
toYaml
public String toYaml()
Serializes this instance to a YAML formatted String- Returns:
- This instance serialized to a YAML formatted String
-
toYaml
public void toYaml(Appendable target)
-
toXml
public String toXml()
Serializes this instance to an XML formatted String- Returns:
- This instance serialized to an XML formatted String
-
toXml
public void toXml(Appendable target)
-
toXml
public String toXml(String name)
Serializes this instance to an XML formatted String- Parameters:
name- the root name for the XML- Returns:
- This instance serialized to an XML formatted String
-
toCsv
public String toCsv()
Serializes this instance to an CSV formatted String- Returns:
- This instance serialized to an CSV formatted String
-
toCsv
public void toCsv(Appendable target)
-
-