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

Private JSONDecoder, Encoder and related #184

Open
t0rn opened this issue Mar 31, 2023 · 3 comments
Open

Private JSONDecoder, Encoder and related #184

t0rn opened this issue Mar 31, 2023 · 3 comments

Comments

@t0rn
Copy link

t0rn commented Mar 31, 2023

Currently jsonDecoder, jsonEncoder, date formatters (Commercetools.swift:216 ) are internal.
Could you make them public?
Actually I want reuse them because of the other issue. It's impossible to catch decoding error because of handling error Result.swift:107 is just logging to console.
I tried to convert your Result type to Swift.Result with concrete error related to decoding, but it's impossible without copying your json decoder implementation.

@nikola-mladenovic
Copy link
Contributor

Hi @t0rn , do you have an example where the encoding / decoding fails?

@t0rn
Copy link
Author

t0rn commented Apr 1, 2023

Hi @t0rn , do you have an example where the encoding / decoding fails?

Hi. No, but I want to catch it when it happens

@nikola-mladenovic
Copy link
Contributor

Got it, thanks 👍

As you've probably seen, it's been a couple of years since the last release, swift continued evolving, and even though the SDK should be completely functional / usable, further changes aren't planned at this point.

If you have a potential project that would benefit from some additions like this, I'd suggest to bring it up during your project trial period.

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