Class 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.
    • Constructor Detail

      • Writer

        public Writer​(manifold.rt.api.Bindings jsonBindings)
      • Writer

        public Writer​(Iterable<?> jsonList)
      • Writer

        public Writer​(Object jsonValue)
    • 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)
      • toCsv

        public String toCsv​(String name)
        Serializes this instance to a CSV formatted String
        Parameters:
        name - the root name for the CSV
        Returns:
        This instance serialized to an CSV formatted String