Comments (3)
If we went forward with this, ideally we would:
- Write up a rationale for why typed errors are an improvement over string errors -- something short, but which lets users know what motivates the change
- Make the change to typed errors with the expectation that the error type will be stable in the future (we're not going to keep adding and removing error cases). Using the same error type as
purescript-codec-argonaut
is a good idea. - Ensure that users can easily recover the string errors from the error type (being able to do
lmap errorToString decodeJson
is fine), to make their migration easier if they just want to continue usingString
and avoid rewriting too much code - Write a short migration guide that helps users switch with minimum effort -- ie. examples of switching to use the new error type and examples of how to keep using
String
if that's what you want.
You don't necessarily need to do all of that as your PR, but I think each of these four should be in place to make the breaking change across quite a big part of the ecosystem.
from purescript-argonaut-codecs.
Ok, I will prepare pr but leave documentation for you
from purescript-argonaut-codecs.
Closed by #73
from purescript-argonaut-codecs.
Related Issues (20)
- Decoding into Map key value expects an array instead of an object HOT 2
- `Map String a` <-> Object HOT 1
- Recursive newtype in not deriving HOT 1
- Add `fromJson` and `toJson` HOT 3
- Add instance for Ratio? HOT 5
- suggestion to replace `"value"` with `"contents"` in `Either` decoder, encoder HOT 2
- Use `elaborateFailure` in `getFieldOptional'` HOT 4
- Address breaking change in typelevel-prelude dependency for PureScript v0.13.0 HOT 1
- Instance for NonEmptyArray? HOT 2
- Feature Request: Enable the default record serialization to be customized HOT 1
- Add instances for 'unordered-collections' data types HOT 2
- Deprecate .:? (getFieldOptional) and .!= (defaultField) HOT 5
- why is `L.insertAt 0 h t` is used? HOT 3
- move JsonDecodeError type to separate package HOT 5
- Wrong type shown in docs HOT 1
- add decoder for NonEmptyString HOT 2
- Support decoding of undefined record field to Nothing HOT 1
- Encode/Decode Natural HOT 1
- An instance for nested tuples?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-argonaut-codecs.