Add serializable method instead of calling json.dumps and doff Nx