Add functionFromJSON()