浏览代码

Merge pull request #1887 from sheffatguidance/fix-js-api-documentation

Fix Issue #1869: faulty js API documentation
Joshua Haberman 9 年之前
父节点
当前提交
6b3d120539
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      js/README.md

+ 1 - 2
js/README.md

@@ -152,8 +152,7 @@ idea of how the library generally works:
     // Serializes to a UInt8Array.
     bytes = message.serializeBinary();
 
-    var message2 = new MyMessage();
-    message2.deserializeBinary(bytes);
+    var message2 = MyMessage.deserializeBinary(bytes);
 
 For more examples, see the tests.  You can also look at the generated code
 to see what methods are defined for your generated messages.