Swon: Swift Macros for Foundation-free JSON processing

Hi,

I wanted to present a repo that I've just published, and some may find useful:

With the intent to drop the Foundation dependency from my cross-platform projects, and also as an exercise to practice Swift Macros, swon provides macros to deliver basic JSON processing without Foundation, not even Codable. Of course, this comes with a few limitations, and there are a couple of TODOs that I need to tackle. Decoding is lean and already functional, nonetheless.

The backing parser is cJSON. Performance is similar to JSONDecoder. Encoding is a TODO, but easy to add soon.

Hope you like it.

4 Likes