title: Serialization-deserialization with Apache Thrift in nodejs
body: <p>I am working on a Node.js application and I need to serialize and deserialize instances of the structs defined in an .thrift file, like the following:</p>
  
  <pre><code> struct Notification {
     1: string subject,
     2: string message
   }
  </code></pre>
  
  <p>Now this is easy doable in Java, according to the tutorial at <a href="http://www.gettingcirrius.com/2011/03/rabbitmq-with-thrift-serialization.html" rel="noreferrer">http://www.gettingcirrius.com/2011/03/rabbitmq-with-thrift-serialization.html</a> :</p>
  
  <pre><code>    Notification notification = new Notification();
      TDeserializer deserializer = new TDeserializer();
      deserializer.deserialize(notification, serializedNotification);
      System.out.println("Received "+ notification.toString());
  </code></pre>
  
  <p>But I can't find how this is done using the nodejs library of Thrift. Can anyone help, please?</p>