{
parents: ["info"],
objtype:"op",
arg: {
name: "Joe",
pos: [4.5, 6.7, 2.3],
meaning_of_life: 42
}
}
In above example "parents" is list attribute containing one string value "info".
Above example also "specifies" Bach encoding for most purposes. List is enclosed with [], mapping is enclosed with {} and string is enclosed with "".
Operation example:
{
parents: ["operation_name"],
objtype:"op",
arg: some object here
}
Object given in argument can be either some other operation or
entity. Entity example:
{
id: "tree23",
objtype:"obj",
parents: ["tree"],
pos: [1.2, 5.6, 1.0]
}
Id of entity is "tree23", class of entity is "tree" and position is [1.2,
5.6, 1.0] = [x,y,z]
{
parents: ["get"],
objtype:"op",
arg: {id: "tree34"}
}
For example of what server returns see Info operation.
{
parents: ["set"],
objtype:"op",
arg: {id: "joe56", name: "Michael"}
}
{
parents: ["create"],
objtype:"op",
arg: {parents:["tree"], pos: [1.2, 5.6, 1.0]}
}
{
parents: ["delete"],
objtype:"op",
arg: {id: "tree34"}
}
Reply to "get" operation example:
{
parents: ["info"],
objtype:"op",
arg: {id: "tree34", parents:["tree"], pos: [1.2, 5.6, 1.0]}
}
Reply to "set" operation example:
{
parents: ["info"],
objtype:"op",
arg: {
parents: ["set"],
objtype:"op",
arg: {id: "joe56", name: "Michael"}
}
}
Reply to "create" operation example:
{
parents: ["info"],
objtype:"op",
arg: {
parents: ["create"],
objtype:"op",
arg: {id: "tree34", parents:["tree"], pos: [1.2, 5.6, 1.0]}
}
}
Reply to "delete" operation example:
{
parents: ["info"],
objtype:"op",
arg: {
parents: ["delete"],
objtype:"op",
arg: {id: "tree34"}
}
}