Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve serialization failure reporting #74

Open
6 tasks
neoeinstein opened this issue Jul 7, 2016 · 1 comment
Open
6 tasks

Improve serialization failure reporting #74

neoeinstein opened this issue Jul 7, 2016 · 1 comment
Milestone

Comments

@neoeinstein
Copy link
Member

neoeinstein commented Jul 7, 2016

Prefer JsonResult<'a> as the return type for deserialization.

  • Create a type, JsonError, consisting of all potential JSON deserialization failures
    • Include a recursive Tag case to allow structured reporting
    • Include a OtherDeserializationError to allow consumers to extend with their own failures
  • Modify JsonResult<'a> to have a JsonError list in the Error case
  • Define functor and applicative functions for JsonResult<'a>
  • Add a formatError : JsonError -> string function
  • Add a JsonResult.toOption function
  • Add a JsonResult.toChoice function
@neoeinstein neoeinstein added this to the Chiron 7 milestone Jul 7, 2016
@kolektiv
Copy link
Member

kolektiv commented Jul 7, 2016

Perhaps also a JsonResult.toOption as well, for when you really don't care why it failed, just that it did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants