-
Notifications
You must be signed in to change notification settings - Fork 2
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
Remove dependency on Foundation #9
Comments
It might just be better to write a JSON parser specifically for the library. Ikiga includes a load of extra stuff we wouldn't need. A JSON parser is fairly easy to write. We could probably ditch the NSNull stuff after that as that is a requirement for parsing output of |
I can see a way around the uses of NSNumber |
We could also just "rip out" the json parser from |
That's kinda what I was thinking. I'd probably go with FoundationEssentials. |
datetime date format is the one thing I can think of that isn't supported by FoundationEssentials |
check the links above, they show the WIP commits in my forks. I can open WIP PRs of course! |
I have not updated the code generator but just brute-force updated the generated files in place |
Here's a start #10 |
I had a look at JSONScanner from Foundation. It's really clever. The scanner just works out the ranges of everything. There is no parsing of values that is done inside the decoder. This means you only convert the values you need. For JMESPath that's great as you don't need to convert most of the file. Actually getting it to work with JMESPath is quite a bit of work though. |
Would be great though ;) |
#11 gets rid of Foundation for loading json. Now need to get rid of writing json and work out how I'm going to keep the Data APIs. |
Nice!
|
Ah didn't realise that. Would be nice to have one entry point which takes a generic. Might be able to use the |
I have been looking into removing the dependency on
Foundation
fromsoto
andsoto-core
. I got really far without too much trouble, but then realized that this library has a pretty strong dependency onFoundation
that is not easily resolvable as many of the types used here are not available inFoundationEssentials
. Such asNSNumber
,NSNull
,JSONSerialization
.Not sure what the best approach would be, maybe it would be better to instead use a different JSON library such as IkigaJSON.
The text was updated successfully, but these errors were encountered: