This object defines the Exceptions used within Persist-Json.
This object has methods that use reflection for converting between Json and user defined case classes.
Provides types and functions for working with Json types.
Provides types and functions for working with Json types.
Json is represented by immutable Scala types. Instead of having separate Json types, type aliases are defined for Json forms.
Scala types used for Json are
- Json Object. Immutable Map[String,Json]. Note that keys are not ordered. When converting to a string with Compact or Pretty keys are sorted. - Json Array. Immutable Seq[Json] - Json String. String - Json Boolean. Boolean - Json Number. Int, Long, BigDecimal (with .), Double (with e) - Json Null. Null
Any of the Json types can be at the top level of a document (not just array and object).
The Json parser supports some extensions that are useful for human edited Json input (such as configurations).
- Comments. The characters // to end of line are discarded during parsing. - Scala-like raw strings. Start with ""{ and end with }"". Treated as normal strings after parsing. - No quotes on simple names. If an object component name starts with a letter and contains only letters and digits the " quotes are not required. After parsing names with and without quotes are not distinguished.
This object has methods that use reflection for converting between Json and user defined case classes. Here is an example: