YAMLJSONConverter

YAMLJSONConverter

new YAMLJSONConverter()

Source:

Methods

(static) convert(code)

Description:
  • Converts the given code to YAML / JSON, to opposite of what the input was.

Source:
Parameters:
Name Type Description
code

(static) isJSON(code)

Description:
  • True/False depending on if the string code can be parsed as JSON

Source:
Parameters:
Name Type Description
code string

(static) isYAML(code)

Description:
  • True/False depending on if the string code can be parsed as YAML

Source:
Parameters:
Name Type Description
code string

(static) loadFromString(code)

Description:
  • Parses the given code string into an object, using either YAML or JSON

Source:
Parameters:
Name Type Description
code string