Class SchemaUtils
java.lang.Object
org.apache.juneau.marshall.jsonschema.SchemaUtils
Utilities for working with the schema annotations.
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringJoins an array of strings with newlines.static JsonMapParses a generic object as JSON and converts it to anJsonMap.static JsonMapConcatenates and parses a string array as a JSON object.Concatenates and parses a string array as JSON array or comma-delimited list.
-
Method Details
-
joinnl
Joins an array of strings with newlines.- Parameters:
s- The arrays to join. Must not benull .- Returns:
- A new joined string.
-
parseMap
Parses a generic object as JSON and converts it to anJsonMap.- Parameters:
o- The object to convert. Can benull (returns a new emptyJsonMap).- Returns:
- The parsed contents (a new empty
JsonMapifoisnull or an empty string), nevernull . - Throws:
ParseException- Invalid JSON encountered.
-
parseMap
Concatenates and parses a string array as a JSON object.- Parameters:
ss- The array to concatenate and parse. Must not benull .- Returns:
- The parsed contents (a new empty
JsonMapif the array is empty or joins to an empty string), nevernull . - Throws:
ParseException- Invalid JSON encountered.
-
parseSet
Concatenates and parses a string array as JSON array or comma-delimited list.- Parameters:
ss- The array to concatenate and parse. Must not benull .- Returns:
- The parsed contents (a new empty mutable
Setif the array is empty or joins to an empty string), nevernull . - Throws:
ParseException- Invalid JSON encountered.
-