Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support to encode & decode Foundation.URL #136

Merged
merged 1 commit into from
Mar 31, 2024
Merged

Conversation

lightsprint09
Copy link
Member

No description provided.

Copy link
Collaborator

@heckj heckj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Lucas! Looks good - thanks for the submission.

I admit I didn't check explicitly, but I thought URL was already codable and that it's default encoding would work to do what you're after. Is it not?

@lightsprint09
Copy link
Member Author

No worries, would have guessed the same. I am currently migrating from the old automerge to the new one and discovered it did not work as expected.

@lightsprint09 lightsprint09 merged commit 8c13c89 into main Mar 31, 2024
4 checks passed
@heckj
Copy link
Collaborator

heckj commented Mar 31, 2024

yeah, just double checked and URL is definitely Codable - I'm guessing this was because you wanted a specific in-automerge-schema representation for it? That plain string?

When I coded it (prior to this PR) and dumped the schema, I got:

      "url" : {
        {
        "relative" :String(https://automerge.org/)
        }
      }

@heckj heckj deleted the url-support branch March 31, 2024 16:53
@lightsprint09
Copy link
Member Author

Right, I would expect. This is how JSONDecoder/Encoder handle an URL

"url" : String(https://automerge.org/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants