Move all JSON de/serialization logic to JsonProtocol

This makes all classes involved appear less cluttered.