JsonSource
Convenience class for obtaining JSON values and Schemas from different sources.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JsonSource.type
Members list
Value members
Concrete methods
Tries to parse the given JSON string.
Tries to parse the given JSON string.
Value parameters
- json
-
the input string
Attributes
- Returns
-
the result wrapped in a Try
Fetches the content from the given URL and tries to parse the result as JSON.
Fetches the content from the given URL and tries to parse the result as JSON.
Value parameters
- url
-
the URL at which a JSON instance is expected
Attributes
- Returns
-
the result wrapped in a Try
Tries to read from the given InputStream and convert the result to a JSON schema. Closes the stream in any case.
Tries to read from the given InputStream and convert the result to a JSON schema. Closes the stream in any case.
Value parameters
- inputStream
-
the input string
Attributes
- Returns
-
the read result wrapped in a JsResult
Tries to parse the given JSON string and convert it to a JSON schema.
Tries to parse the given JSON string and convert it to a JSON schema.
Value parameters
- json
-
the input string
Attributes
- Returns
-
the result wrapped in a JsResult
Fetches the content from the given URL and tries to parse the result as a JSON schema.
Fetches the content from the given URL and tries to parse the result as a JSON schema.
Value parameters
- url
-
the URL at which a JSON schema is expected
Attributes
- Returns
-
the result wrapped in a JsResult