Crystal's JSON is case-sensitive, which means this throws an error:
struct Payload
include JSON::Serializable
@[JSON::Field]
getter command : String
end
# Unhandled exception: Missing JSON attribute: command
Payload.from_json(%({"Command": "Subscribe"}))
Also, since we're checking against a case sensitive value, that Subscribe also fails
|
return subscribe(payload) if payload.command == "subscribe" |
Crystal's JSON is case-sensitive, which means this throws an error:
Also, since we're checking against a case sensitive value, that
Subscribealso failscable/src/cable/connection.cr
Line 126 in bfdb55d