Continuing on with that WebExtension, but with a detour in custom Encoders

https://www.whynotestflight.com/excuses/how-do-custom-encoders-work/

Found the best thing for it was copying and making crazy graphs of some existing encoders in the Apple/GitHub repos. Here's 4

I found the comparison between the two different JSONEncoder implementations particularly interesting.

#Codable, #Encoder, #SwiftLang, #JSON, #JSONEncoder, #URIEncoder

How do custom Encoder's work?

A list of distractions

And now a simple but pretty thorough implementation of an Encoder with tests. (Although still more of a toy / somewhere to start than something anyone should use.)

- https://www.whynotestflight.com/excuses/and-what-can-i-make-a-custom-encoder-do/

- https://github.com/carlynorama/CoderExplorer/

It goes on forever. As I say in the summary 1578 lines down: "Encoders. Not so fiddly if one can be ruthless in vetting the input. Interminable to write if trying to be general purpose. "

And this one isn't even configurable!

#Codable, #Encoder, #SwiftLang

And what can I make a custom Encoder do?

A list of distractions

Getting ready for the Decoder part, reviewing a few ways break up a String

https://www.whynotestflight.com/excuses/wait-how-do-i-scan-text-again/

The RegExBuilder regex is surprisingly speedy in context!

#SwiftLang, #parsing, #regex, #Scanner, #RegExBuilder

Wait, how do I scan text again?

A list of distractions

Have to kick this one out the door to keep moving! Date Parsing. That's a career.

I'm just looking at the new as of 2021 date formatting options in Swift and how to use them in a function for a Decoder.

https://www.whynotestflight.com/excuses/date-parsing.-nose-wrinkle./

#SwiftLang, #DateParsing, #DateFormatStyle, #ParseStrategy, #VerbatimFormatStyle, #DateFormatString

Date Parsing. Nose wrinkle.

A list of distractions

This one's a short one for me because with the simple string and date parsing done a Decoder can come together pretty quickly...

when you also have low standards!

This isn't the pair to the SimpleCoder Encoder. This is a simple stand alone Decoder because I couldn't find a good _public_ example of one that wasn't elaborate. (Makes sense... because why bust out a Decoder if you don't need general purpose and elaborate? (Really, don't))

https://www.whynotestflight.com/excuses/what-would-be-a-very-simple-working-decoder/

#SwiftLang, #Decoder

What would be a very simple working Decoder?

A list of distractions