Packages

package util

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait JsonImplicits extends AnyRef
  2. class OReadsOps[A] extends AnyRef
  3. class OWritesOps[A] extends AnyRef

    Alter operations available on Play-JSON Reads[T] & Writes[T]

    Alter operations available on Play-JSON Reads[T] & Writes[T]

    Inspired by http://kailuowang.blogspot.co.nz/2013/11/addremove-fields-to-plays-default-case.html

    Created by apatzer on 3/17/17.

  4. trait RobustPrimitives extends AnyRef

Value Members

  1. object JsonImplicits extends JsonImplicits
  2. object JsonNaming
  3. object OReadsOps
  4. object OWritesOps
  5. object RobustParsing

    We may fail to parse certain fields of a redox Json message to our domain object.

    We may fail to parse certain fields of a redox Json message to our domain object. However, we still need to extract useful fields from the message to continue processing, Robust parsing will recursively parse and then remove any invalid fields until a result can be obtained.

    First we try to parse the passed in Json object, if there are any errors we trim the heads of the paths containing the errors and try to parse again. This allows us to assign defaults to any fields that cannot be parsed if they are defined and try to get a valid result.

    This returns a tuple of (maybeErrors, maybeResult) so nessorory action can be taken downstream about and recovered errors. ie: Logging recovery errors to fix if needed.

Ungrouped