ezjsonm icon indicating copy to clipboard operation
ezjsonm copied to clipboard

Design of accessors functions

Open lindig opened this issue 4 years ago • 0 comments

The accessor functions raise exceptions when their preconditions are not met. What is your take on an additional interface, maybe in a submodule Opt or similar, which returns option values instead? I believe this would facilitate using Option.bind quite nicely and monadic error handling. Given the dynamic nature of JSON values, error handling somewhat cumbersome and this could help to make it smoother.

lindig avatar Jan 25 '21 19:01 lindig