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

Data instead of JSON - anyone wanna work on this with me? #345

Open
lk251 opened this issue Feb 9, 2021 · 6 comments
Open

Data instead of JSON - anyone wanna work on this with me? #345

lk251 opened this issue Feb 9, 2021 · 6 comments

Comments

@lk251
Copy link
Contributor

lk251 commented Feb 9, 2021

Is this because Decodable wasn't available before?
I'd like swifter to produce a Data instance which I can use JSONDecoder with. Anyone wanna collaborate on this?

not sure how to decode this JSON so I'm having to stringify with json.description first which seems like a terrible idea

@lk251
Copy link
Contributor Author

lk251 commented Mar 9, 2021

as a result, \t is appearing as tab control character, breaking JSONDecoder decoding

@lk251
Copy link
Contributor Author

lk251 commented Mar 10, 2021

@meteochu @mattdonnelly hi guys! i'm super grateful for your work, if you have a minute, I would appreciate some guidance: Why is decoding done with a bespoke JSON type, when using JSONDecoder with Swift Data type is so easy and convenient?
Am I missing something? Perhaps the reason I don't see the advantage is because I didn't build the library.
But right now it seems awkward to decode the by applying a set of string keys.

@steipete
Copy link

I need this as well and replaced the json with data in my fork.

@antranapp
Copy link

@steipete any chance you can share your fork?

@steipete
Copy link

This is like a 10 minute edit. My fork contains far more changes done specifically for my purpose, makes no sense to open source.

@thebrandontyler
Copy link

I submitted a PR for this back in January. Feel free to take a look at it and see if it works for you: #341

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

4 participants