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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -