[Finishes #74707228] Added methods to convert Calc JSON into CalcDB JSON and vice versa.

copy over changes from other pull request