rest - Dart RPC and object hierarchies -
this basic question rest apis. started reading docs , don't see how implement api object/model has sub-objects. instead there description of objects primitives (int, string, etc).
is there example object hierarchy? or maybe server model uses ids in class definitions refer sub-objects, how google's ndb it?
from docs:
currently supported types public fields int, double, bool, string, datetime, list, map, , message class.
this means can create structure need, requirement objects in must constructed of in particular way.
an example:
class person { string name; int age } class address { string city; string street; } class school { list<person> staff; person headmaster; list<person> students; address address; } one limitation did not cannot use inheritance in these classes, again whole point of rpc package create api can consumed client, not dart code.
Comments
Post a Comment