put toJSONValue/fromJSONValue on the constructor function so just the ctor function needs to be provided on { toJSONValue: ctor, ... } not {toJSONValue:ctor.prototype }
make the additional properties not enumerable so that when looking at keys we only see the property values themselves.