brandonchinn178 / aeson-schemas

Easily consume JSON data on-demand with type-safety
http://hackage.haskell.org/package/aeson-schemas
BSD 3-Clause "New" or "Revised" License
52 stars 1 forks source link

Add SchemaTry #31

Closed brandon-leapyear closed 4 years ago

brandon-leapyear commented 4 years ago

:sparkles: This is an old work account. Please reference @brandonchinn178 for all future communication :sparkles:


{
  a: Try {
    b: Int
  }
}

Will return Just if a has a value matching { b: Int } or Nothing if not. This is different from Maybe, where Nothing is only returned if the value is null; any other non-matching values returns a parse error.