Finalized Media's toJSON functionality.