If you call serialize on the camera it will create a serialization object containing the properties needed to re-create the camera, which can be done by calling the static function Camera.Parse. But it’s up to you to call JSON.Stringify and save it to a file and then later load the file and call JSON.Parse before passing the serialization object to Camera.Parse.
I think you could store just the position, rotation, target and timestamp thou (maybe more depending on what else is changing each frame, I think maybe that’s enough for recoding user-controlled camera animation thou)… For example you could do it at the end of each frame, after the they’ve been updated, using scene.registerAfterRender, and check if any of the values are different from the last frame in the array before pushing to an array of frames (or could use a minimum threshold to check if any of the values have changed enough to create and push a new frame). And if you want to condense the data a bit, asArray and copyFromFloats/FromArray could be useful to convert between a Vector3 object and an array of 3 floats, for example.
Or maybe it would be better to store higher level instructions to control the camera, corresponding to the user’s inputs? I’ve never tried to implement camera recording thou, not sure which approach would work best.