Added json constructor for RetCalc