Class SnakeYamlNode.Factory

java.lang.Object
dev.harrel.jsonschema.providers.SnakeYamlNode.Factory
All Implemented Interfaces:
JsonNodeFactory
Enclosing class:
SnakeYamlNode

public static final class SnakeYamlNode.Factory extends Object implements JsonNodeFactory
  • Constructor Details

    • Factory

      public Factory()
    • Factory

      public Factory(org.yaml.snakeyaml.Yaml yaml)
  • Method Details

    • wrap

      public JsonNode wrap(Object node)
      Description copied from interface: JsonNodeFactory
      Wraps provider specific JSON node into JsonNode. The returned node is considered a root node and all further JSON pointers will be calculated from this node. Main purpose of this method is to avoid additional JSON parsing. It can also be used to convert any instance of JsonNode to a root node.
      Specified by:
      wrap in interface JsonNodeFactory
      Parameters:
      node - provider specific representation of JSON node
      Returns:
      wrapped node
    • create

      public JsonNode create(String rawJson)
      Description copied from interface: JsonNodeFactory
      Creates JsonNode from raw JSON string. The returned node is considered a root node and all further JSON pointers will be calculated from this node.
      Specified by:
      create in interface JsonNodeFactory
      Parameters:
      rawJson - JSON in string form
      Returns:
      created node