Closed sectore closed 7 years ago
Description: If a data constructor of ItemKind has a Maybe a parameter, then decoding the result of endpoint http://localhost:4400/category/{id} (e.g. http://localhost:4400/category/jhgj62o7) might be failed with an error such as:
ItemKind
Maybe a
http://localhost:4400/category/{id}
Error loading data: [JSONDecodingError]: "Generic json decoding failed: Expected a string: '[]'"
What I can see is that this issue ^ is related to decoding Library (Maybe Text) (and maybe Tool (Maybe Text) - I've not found an example of Tool ..). Parsing / decoding Other has no issues (For example http://localhost:4400/category/dila2lox).
Library (Maybe Text)
Tool (Maybe Text)
Tool ..
Other
How to reproduce?
git checkout -b sectore/202-api-endpoints
How to fix: Check if purescript-argonaut-generic-codecs does need another options as we currently have defined to parse sum types with Maybe a as a parameter of data types as ItemKind it has.
purescript-argonaut-generic-codecs
Description: If a data constructor of
ItemKind
has aMaybe a
parameter, then decoding the result of endpointhttp://localhost:4400/category/{id}
(e.g. http://localhost:4400/category/jhgj62o7) might be failed with an error such as:What I can see is that this issue ^ is related to decoding
Library (Maybe Text)
(and maybeTool (Maybe Text)
- I've not found an example ofTool ..
). Parsing / decodingOther
has no issues (For example http://localhost:4400/category/dila2lox).How to reproduce?
git checkout -b sectore/202-api-endpoints
How to fix: Check if
purescript-argonaut-generic-codecs
does need another options as we currently have defined to parse sum types withMaybe a
as a parameter of data types asItemKind
it has.