{"action":"created","issue":{"url":"https://api.github.com/repos/protostuff/protostuff/issues/139","labels_url":"https://api.github.com/repos/protostuff/protostuff/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/protostuff/protostuff/issues/139/comments","events_url":"https://api.github.com/repos/protostuff/protostuff/issues/139/events","html_url":"https://github.com/protostuff/protostuff/issues/139","id":109267310,"number":139,"title":"ArraySchemas proto format","user":{"login":"fhackenberger","id":910936,"avatar_url":"https://avatars.githubusercontent.com/u/910936?v=3","gravatar_id":"","url":"https://api.github.com/users/fhackenberger","html_url":"https://github.com/fhackenberger","followers_url":"https://api.github.com/users/fhackenberger/followers","following_url":"https://api.github.com/users/fhackenberger/following{/other_user}","gists_url":"https://api.github.com/users/fhackenberger/gists{/gist_id}","starred_url":"https://api.github.com/users/fhackenberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhackenberger/subscriptions","organizations_url":"https://api.github.com/users/fhackenberger/orgs","repos_url":"https://api.github.com/users/fhackenberger/repos","events_url":"https://api.github.com/users/fhackenberger/events{/privacy}","received_events_url":"https://api.github.com/users/fhackenberger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/protostuff/protostuff/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-01T09:52:24Z","updated_at":"2015-10-01T10:59:37Z","closed_at":null,"body":"Hi!\r\n\r\nI'm currently working on creating a .proto file for the RuntimeSchema in protostuff 1.3.6. I'm building on https://github.com/inwebby/protostuff-runtime-proto which was written for protostuff 1.0.9. Since then the way how arrays are mapped has changed. Reading ArraySchemas, I'm suspecting that it might be impossible to define a .proto file for the way how arrays are mapped, since the type of the actual array message fields itself depends on the id field.\r\n\r\n```proto\r\n message ArrayScalar {\r\n  optional uint32 id = 33;\r\n  optional uint32 len = 1;\r\n  repeated XXX data = 2;\r\n}\r\n```\r\n\r\nMy question is, how would I define the data field (marked XXX above) in .proto language, when the type of the data fields is only determined after reading and looking at the id field?"},"comment":{"url":"https://api.github.com/repos/protostuff/protostuff/issues/comments/144697101","html_url":"https://github.com/protostuff/protostuff/issues/139#issuecomment-144697101","issue_url":"https://api.github.com/repos/protostuff/protostuff/issues/139","id":144697101,"user":{"login":"kshchepanovskyi","id":4040120,"avatar_url":"https://avatars.githubusercontent.com/u/4040120?v=3","gravatar_id":"","url":"https://api.github.com/users/kshchepanovskyi","html_url":"https://github.com/kshchepanovskyi","followers_url":"https://api.github.com/users/kshchepanovskyi/followers","following_url":"https://api.github.com/users/kshchepanovskyi/following{/other_user}","gists_url":"https://api.github.com/users/kshchepanovskyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kshchepanovskyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshchepanovskyi/subscriptions","organizations_url":"https://api.github.com/users/kshchepanovskyi/orgs","repos_url":"https://api.github.com/users/kshchepanovskyi/repos","events_url":"https://api.github.com/users/kshchepanovskyi/events{/privacy}","received_events_url":"https://api.github.com/users/kshchepanovskyi/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T10:59:37Z","updated_at":"2015-10-01T10:59:37Z","body":"> I'm suspecting that it might be impossible to define a .proto file for the way how arrays are mapped\r\n\r\nIn general, it's a conceptual problem, and there is no trivial solution. Maybe new [Any](https://developers.google.com/protocol-buffers/docs/proto3?hl=en#any) type (introduced in proto3) might help - I will check."}}