JSONShootout icon indicating copy to clipboard operation
JSONShootout copied to clipboard

Reflection and built-in Swift support

Open JetForMe opened this issue 3 years ago • 0 comments

I may be misreading here, but in your section “That Thing on the Swift Blog,” you reference a Swift blog post from 2016. The concluding section (“Reflecting on Reflection”) of that post argues not against third-party frameworks, but against using reflection.

However, there’s a newer Swift blog post (well, I could have sworn I saw an official Swift blog post) that uses Swift’s JSONDecoder, which uses reflection by default. I thought that article argued against third-party libraries, but now I just can't find it (perhaps it was not an Apple or Swift post. Here’s one). I tend to use Marshal, but I’m all for removing dependencies. I'll probably switch to JSONDecoder(), but I was curious about its performance. it’s probably different when using reflection vs. explicit decoding.

JetForMe avatar May 12 '21 06:05 JetForMe