I have some objects deserialized from JSON to which I would like to assign a new prototype to provide various getter and setter functions. The obvious way to do this (as mentioned in this question ) is to install
myJsonObj.__proto__ = { function1: /* ... */, function2: /* ... */ };
However, since MDC is useful to indicate , the __proto__ property is non-standard and deprecated. Is there any standard-compatible way (for some definition of "standards") to achieve the same effect without creating many new wrapper objects?
json javascript prototype
kpozin
source share