Make objects convertable to and from JSON