[Java] Class YamlConverter
- org.apache.groovy.yaml.util.YamlConverter
public class YamlConverter
A converter for converting YAML to JSON, vice versa
- Since:
- 3.0.0
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public static String |
convertJsonToYaml(Reader jsonReader) Convert json to yaml | |
public static String |
convertYamlToJson(Reader yamlReader) Convert yaml to json |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail
public static String convertJsonToYaml(Reader jsonReader)
Convert json to yaml
- Parameters:
-
jsonReader
- the reader of json
- Returns:
- the text of yaml
public static String convertYamlToJson(Reader yamlReader)
Convert yaml to json
- Parameters:
-
yamlReader
- the reader of yaml
- Returns:
- the text of json
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/apache/groovy/yaml/util/YamlConverter.html