Replace class variables at the top-level

Eliminate warnings from `JsonProtocol` of the form:

    warning: class variable access from toplevel