object JsonSource
Convenience class for obtaining JSON values and Schemas from different sources.
- Alphabetic
- By Inheritance
- JsonSource
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fromString(json: String): Try[JsValue]
Tries to parse the given JSON string.
Tries to parse the given JSON string.
- json
the input string
- returns
the result wrapped in a Try
- def fromUrl(url: URL): Try[JsValue]
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.
- url
the URL at which a JSON instance is expected
- returns
the result wrapped in a Try
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def schemaFromStream(inputStream: InputStream)(implicit reads: Reads[SchemaType]): JsResult[SchemaType]
Tries to read from the given InputStream and convert the result to a JSON schema.
Tries to read from the given InputStream and convert the result to a JSON schema. Closes the stream in any case.
- inputStream
the input string
- returns
the read result wrapped in a JsResult
- def schemaFromString(json: String)(implicit reads: Reads[SchemaType]): JsResult[SchemaType]
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.
- json
the input string
- returns
the result wrapped in a JsResult
- def schemaFromUrl(url: URL)(implicit reads: Reads[SchemaType]): JsResult[SchemaType]
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.
- url
the URL at which a JSON schema is expected
- returns
the result wrapped in a JsResult
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])