Newbie question... If I have the following sample "User" JSON data:

{
  firstName: 'Bob'
  lastName: 'Smith',
  email: '[email protected]',
  metadata: {
    // a plain JS object that 
    // - will always exist and be at least an empty {} object
    // - could potentially contain any number of properties and values, 
depending on specific "user"
  }
}

How do I represent the metadata property within proto definition? I've tried

message User {
  message Metadata {}

  string email = 1;
  string firstName = 2;
  string lastName = 3;
  Metadata metadata = 4;
}

or using `Any`

message User {
  string email = 1;
  string firstName = 2;
  string lastName = 3;
  google.protobuf.Any details = 4;
}


but without success. Working within Node.js if relevant. Any help is much 
appreciated. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to