Class YamlConverter


  • public class YamlConverter
    extends java.lang.Object
    A converter for converting YAML to JSON, vice versa
    Since:
    3.0.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String convertJsonToYaml​(java.io.Reader jsonReader)
      Convert json to yaml
      static java.lang.String convertYamlToJson​(java.io.Reader yamlReader)
      Convert yaml to json
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • convertYamlToJson

        public static java.lang.String convertYamlToJson​(java.io.Reader yamlReader)
        Convert yaml to json
        Parameters:
        yamlReader - the reader of yaml
        Returns:
        the text of json
      • convertJsonToYaml

        public static java.lang.String convertJsonToYaml​(java.io.Reader jsonReader)
        Convert json to yaml
        Parameters:
        jsonReader - the reader of json
        Returns:
        the text of yaml