Writing and things

TIL 2025.4.18

Today I learned

  • More confidence. No really! The more I work on projects, the better I feel about building things!
    Now, I can hear you saying: “Justin. That’s the point of practicing.” Yes yes yes. I get this…like as a concept but my wild brain just doesn’t believe it until I do it a lot.
  • I was (gasp) overthinking my JSON conversion project. I was thinking I had to have two different models. One was the existing/incoming data, and the other was the new/outgoing data. Nope. I read and re-read the Codable Protocol documentationand a few other helpful things. I learned that I just had to write the correct logic to decode (in this case it the init(from: Decoder)) and then what ever custom encoding method (the encode(to:) method).
    • The last bit I’m fussing with is taking the flat incoming JSON, making a check to see if one of the object is a parent object. If it’s not, I want to make it into a child object that is contained in an array of the parent.

Add Your Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.