Created by: jaumard
Here is my current work to allow the generator of jaguar dart to support either json or proto serialization.
I've added a serializarion
param to choose json or proto.
I proto models should be generated as proto files and not dart files. For now I'm blocked because I'm trying to do this:
message {{classname}} {
{{#vars}}
{{{datatype}}} {{name}} = {{@index}};
{{/vars}}
}
Apparently the {{@index}} is not supported :/ and return empty. But in proto definition you need to specify the index of each field like:
message Person {
string name = 1;
int32 id = 2;
string email = 3;
}