Migration to JSON::Serializable #211
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you ❤️
src/discordcr/mappings/oauth2.cr
Outdated
include JSON::Serializable | ||
property icon : String? | ||
property id : Snowflake | ||
property members : Array(TeamMember) | ||
property owner_user_id : Snowflake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like the identation is a bit off here
src/discordcr/mappings/oauth2.cr
Outdated
include JSON::Serializable | ||
property membership_state : TeamMembershipState | ||
property permissions : Array(String) | ||
property team_id : Snowflake | ||
property user : User |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like the identation is a bit off here
src/discordcr/mappings/vws.cr
Outdated
struct IdentifyPacket | ||
include JSON::Serializable | ||
def initialize(server_id, user_id, session_id, token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think its a good practice to separate the include JSON::Serializable
with one newline
e.g.
class Klass
include JSON::Serializable
property username : String?
end
No problem! I'm glad I could help 😄 |
@MineBartekSA You should able to run |
Oh, right, I totally forgot that this tool exists. Thanks for the tip |
Done, but still needed to add some new lines by hand |
I've migrated all structs to the new JSON::Serializable in Crystal 0.35.0