diff --git a/docs/client/api.html b/docs/client/api.html index b9e5b94418..728448d5ae 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -229,10 +229,10 @@ Example: } }); -Calling `methods` on the server defines functions that can be called -remotely by clients. They should return a value or throw an exception. -Inside your method invocation, `this` is bound to a method invocation -object, which provides the following: +Calling `methods` on the server defines functions that can be called remotely by +clients. They should return an [EJSON](#ejson)-able value or throw an +exception. Inside your method invocation, `this` is bound to a method +invocation object, which provides the following: * `isSimulation`: a boolean value, true if this invocation is a stub. * `unblock`: when called, allows the next method from this client to @@ -458,7 +458,7 @@ traditional ORM (Object-Relation Mapper)-centric framework. It sets up a *collection* (a storage space for records, or "documents") that can be used to store a particular type of information, like users, posts, scores, todo items, or whatever matters to your application. Each -document is a JSON object. It includes an `_id` property whose value is +document is a EJSON object. It includes an `_id` property whose value is unique in the collection, which Meteor will set when you first create the document. @@ -602,7 +602,7 @@ Equivalent to `find(selector, options).fetch()[0]`. {{> api_box insert}} Add a document to the collection. A document is just an object, and -its fields can contain any combination of JSON-compatible datatypes +its fields can contain any combination of EJSON-compatible datatypes (arrays, objects, numbers, strings, `null`, true, and false). `insert` will generate a unique ID for the object you pass, insert it diff --git a/docs/client/api.js b/docs/client/api.js index c58142f6d6..c442898588 100644 --- a/docs/client/api.js +++ b/docs/client/api.js @@ -377,7 +377,7 @@ Template.api.meteor_call = { type: "String", descr: "Name of method to invoke"}, {name: "param1, param2, ...", - type: "JSON", + type: "EJSON", descr: "Optional method arguments"}, {name: "asyncCallback", type: "Function", @@ -1362,7 +1362,7 @@ Template.api.set = { type: "String", descr: "The key to set, eg, `selectedItem`"}, {name: "value", - type: "JSON-able object or undefined", + type: "EJSON-able object or undefined", descr: "The new value for `key`"} ] };