You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
How can i validate the protocol buffer data? such as the xsd for the
xml?
eg. 1.only 8 size string
2.e-mail format validate!
Hein
unread,
Jul 8, 2008, 1:23:15 PM7/8/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
A validation/constraints framework that would make everybody happy
would be Turing complete; therefore protocol buffers don't include it.
It is simple enough to write a bool IsWellFormed(const MyMessage&);
function.
-Hein
Kenton Varda
unread,
Jul 8, 2008, 2:13:50 PM7/8/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Sorry, but validation of this sort is not part of protocol buffers. You'll need to write validation routines separately. We made a conscious decision not to try to support validation in the .proto language itself because it seemed like it would require a turing-complete language to express arbitrary validators, and we wanted to keep things simple.