Class GsonNode.Factory

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

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

    • Factory

      public Factory()
  • Method Details

    • wrap

      public GsonNode wrap(Object node)
      Description copied from interface: JsonNodeFactory
      Wraps provider specific JSON node into JsonNode. Main purpose of this method is to avoid additional JSON parsing. If passed object is already JsonNode it should be returned directly.
      Specified by:
      wrap in interface JsonNodeFactory
      Parameters:
      node - provider specific representation of JSON node
      Returns:
      wrapped node
    • create

      public GsonNode create(String rawJson)
      Description copied from interface: JsonNodeFactory
      Creates JsonNode from raw JSON string.
      Specified by:
      create in interface JsonNodeFactory
      Parameters:
      rawJson - JSON in string form
      Returns:
      created node