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

Implement Code Action to Generate JSON Encoder #4229

Merged
merged 8 commits into from
Feb 11, 2025

Conversation

GearsDatapacks
Copy link
Member

Closes #4227
This is basically a copy-paste-change of the generate dynamic decoder action.

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Fantastic! I've left one tiny note inline. Thank you

option.Some(value) -> json.int(value)
}),
#("something", todo as "Encoder for Something"),
#("map", json.dict(wibble.map, fn(string) { string }, json.array(_, json.float(_)))),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#("map", json.dict(wibble.map, fn(string) { string }, json.array(_, json.float(_)))),
#("map", json.dict(wibble.map, fn(string) { string }, json.array(_, json.float))),

🙏

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, that's fair. That was a bit I was a little iffy on

@GearsDatapacks
Copy link
Member Author

Ah, I've just found a bug. Let me fix that quickly

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Thank you!

@lpil
Copy link
Member

lpil commented Feb 11, 2025

ack, merge conflicts!

@GearsDatapacks
Copy link
Member Author

Yep. I'm out at the moment, I'll resolve them when I get home

@lpil
Copy link
Member

lpil commented Feb 11, 2025

I'm on it 😎

@lpil lpil force-pushed the generate-json-encoder branch from 5182922 to 76a0171 Compare February 11, 2025 13:29
@lpil lpil merged commit cc17b0e into gleam-lang:main Feb 11, 2025
12 checks passed
@GearsDatapacks GearsDatapacks deleted the generate-json-encoder branch February 11, 2025 16:17
@GearsDatapacks
Copy link
Member Author

Thanks!

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.

LSP Code Action: Generate JSON Encoder
2 participants