Yeah, I'm fine either way, considering it's so trivial. My inclination for
JSON apis is to include valid keys even if null (we actually didn't do this
initially with Stripe, but changed it because there's a lot of mental
overhead for developers to track down all possible props otherwise).

On Sunday, August 18, 2013, Paul Hammond wrote:

> In lib/einhorn/command/interface.rb:
>
> >      end
> >
> > -    def self.generate_response(conn, command)
> > -      begin
> > -        request = Einhorn::Client::Transport.deserialize_message(command)
> > -      rescue ArgumentError => e
> > -        return {
> > -          'message' => "Could not parse command: #{e}"
> > -        }
> > +    def self.send_message(conn, message, request_id = nil, last = false)
> > +      if request_id
>
> I think you still want some form of conditional to avoid the server
> sending { message => "…", request_id => nil }. The part where this makes
> the protocol completely backwards compatible is just an added bonus.
>
> I'm happy to change this if you'd prefer to remove the complexity.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/stripe/einhorn/pull/28/files#r5833094>
> .
>


-- 
Sent from mobile