Hi everyone, I have been successful in saving the Schema to a std::string, and parsing it back to a schema. But it seems to be incorrect, since I can't parse the actual data later on.
I have created a standalone example to serialize both an AddressBook message and an AddressBook Schema into a std::string, then recreate first the schema from the std::string and use that schema to create a dynamic message of the original AddressBook message. The sample compiles with both VS 2015 and GCC 5.4 (of course, capnproto needs to be installed). Using capnp::SchemaLoader loader; loader.loadCompiledTypeAndDependencies<AddressBook>(); auto schemas = loader.getAllLoaded(); creates an array of schemas, of which the first one is the schema for `People`, not for `AddressBook`. Using these to parse my data later on, produces a runtime exception. If instead I am using only auto schema = capnp::Schema::from<AddressBook>(); I can iterate over my data, but it will show the AddressBook as a list with two entries, but not information about the list content is available. Running the sample will produce the exception. I highly appreciate if someone could take a quick look at the code. -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/capnproto.
<<attachment: capnp_test-master.zip>>