Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Apr 16, 2024

This PR moves all our uses of JSONEncoder and JSONDecoder to a new namespace enum, JSON, and provides interfaces that don't use Foundation.

This change does not remove our dependency on Foundation's JSON functionality, but it should allow us to replace that functionality in the future with JSON encoding/decoding logic from another library (or home-grown, if necessary.)

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR moves all our uses of `JSONEncoder` and `JSONDecoder` to a new namespace
enum, `JSON`, and provides interfaces that don't use Foundation.

This change does _not_ remove our dependency on Foundation's JSON functionality,
but it should allow us to replace that functionality in the future with JSON
encoding/decoding logic from another library (or home-grown, if necessary.)
@grynspan grynspan added enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs labels Apr 16, 2024
@grynspan grynspan self-assigned this Apr 16, 2024
@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan
Copy link
Contributor Author

@swift-ci please test Linux

@grynspan
Copy link
Contributor Author

Linux failure is because we've removed some Foundation imports (which reexport Glibc, I guess.) Explicitly adding the necessary headers to Includes.h.

@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan grynspan requested a review from stmontgomery April 16, 2024 18:30
@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan grynspan merged commit 8705819 into main Apr 16, 2024
@grynspan grynspan deleted the jgrynspan/abstract-json-dep branch April 16, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants