title: How to parse binary data into RapidJson document
body: <p>I have a client server setup.
  The client serializes JSON documents to binary format.
  The client sends the binary data to the server.
  The server should convert back the char * buffer to a JSON string.</p>
  
  <p>I did not find a way using 'Document' or other stream API.</p>
  
  <p>example:</p>
  
  <p>The client  is serializing the following data:</p>
  
  <pre><code>char * test()
  {
      // 1. Parse a JSON string into DOM.
      const char* json = "{\"project\":\"rapidjson\",\"stars\":11}";
  
      Document d;
      d.Parse(json);
  
      // 3. Stringify the DOM
      StringBuffer buffer;
      Writer&lt;StringBuffer&gt; writer(buffer);
      d.Accept(writer);
  
      const char *jsonString = buffer.GetString();
      return jsonString;
  }
  </code></pre>
  
  <p>The server code:</p>
  
  <pre><code>static const unsigned char JsonBinary[]={0x7b, 0x22, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,     0x22, 0x3a, 0x22, 0x72, 0x61, 0x70, 0x69, 0x64, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x72, 0x73, 0x22, 0x3a, 0x31, 0x31, 0x7d};
  
  void deserialize(char * bin)
  {
      Document d;
      // how to convert the char * to Document to get back the JSON string?
  }
  </code></pre>
  
  <p>Thanks</p>