About Spark protocol

I want to take some store to a memcached in memory data, such as the socket handle such.
But the JSON object is not serializable, (JSON.stringify) conversion error.