Class SchemaUtils

java.lang.Object
org.apache.juneau.jsonschema.SchemaUtils

public class SchemaUtils extends Object
Utilities for working with the schema annotations.
See Also:
  • Constructor Details

  • Method Details

    • parseMap

      public static JsonMap parseMap(String[] ss) throws ParseException
      Concatenates and parses a string array as a JSON object.
      Parameters:
      ss - The array to concatenate and parse.
      Returns:
      The parsed contents.
      Throws:
      ParseException - Invalid JSON encountered.
    • parseMap

      public static JsonMap parseMap(Object o) throws ParseException
      Parses a generic object as JSON and converts it to an JsonMap.
      Parameters:
      o - The object to convert.
      Returns:
      The parsed contents.
      Throws:
      ParseException - Invalid JSON encountered.
    • parseSet

      public static Set<String> parseSet(String[] ss) throws ParseException
      Concatenates and parses a string array as JSON array or comma-delimited list.
      Parameters:
      ss - The array to concatenate and parse.
      Returns:
      The parsed contents.
      Throws:
      ParseException - Invalid JSON encountered.
    • joinnl

      public static String joinnl(String[]... s)
      Joins an array of strings with newlines.
      Parameters:
      s - The array to join.
      Returns:
      A new joined string.