{"action":"created","issue":{"url":"https://api.github.com/repos/google/flatbuffers/issues/341","labels_url":"https://api.github.com/repos/google/flatbuffers/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/google/flatbuffers/issues/341/comments","events_url":"https://api.github.com/repos/google/flatbuffers/issues/341/events","html_url":"https://github.com/google/flatbuffers/issues/341","id":116427479,"number":341,"title":"GetRootAsXXX and Finish not generated consistently across languages","user":{"login":"mmastrac","id":512240,"avatar_url":"https://avatars.githubusercontent.com/u/512240?v=3","gravatar_id":"","url":"https://api.github.com/users/mmastrac","html_url":"https://github.com/mmastrac","followers_url":"https://api.github.com/users/mmastrac/followers","following_url":"https://api.github.com/users/mmastrac/following{/other_user}","gists_url":"https://api.github.com/users/mmastrac/gists{/gist_id}","starred_url":"https://api.github.com/users/mmastrac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmastrac/subscriptions","organizations_url":"https://api.github.com/users/mmastrac/orgs","repos_url":"https://api.github.com/users/mmastrac/repos","events_url":"https://api.github.com/users/mmastrac/events{/privacy}","received_events_url":"https://api.github.com/users/mmastrac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-11T21:43:09Z","updated_at":"2016-01-28T06:10:25Z","closed_at":null,"body":"I'm using flatbuffers in a project that generates source in three different languages (Go, Java, JS). The inconsistency in generating \"root\" methods is a bit confusing:\r\n\r\n  - Go generates the “GetRootAs” only for the root type, and generates no “finish” methods at all\r\n  - JS generates \"GetRootAs\" for all types and generates \"finish\" methods for the root type\r\n  - Java generates \"GetRootAs\" for all types and generates \"finish\" methods for the root type\r\n\r\nI would suggest that all languages take the Java/JS approach. I've found that this is the most convenient approach for testing. Often times I want to round-trip sub-objects to flatbuffers for testing and I can synthesize a \"finish\" method, but the lack of \"GetRootAs\" is a bit more annoying as the logic tends to be non-trivial."},"comment":{"url":"https://api.github.com/repos/google/flatbuffers/issues/comments/176000702","html_url":"https://github.com/google/flatbuffers/issues/341#issuecomment-176000702","issue_url":"https://api.github.com/repos/google/flatbuffers/issues/341","id":176000702,"user":{"login":"rw","id":21367,"avatar_url":"https://avatars.githubusercontent.com/u/21367?v=3","gravatar_id":"","url":"https://api.github.com/users/rw","html_url":"https://github.com/rw","followers_url":"https://api.github.com/users/rw/followers","following_url":"https://api.github.com/users/rw/following{/other_user}","gists_url":"https://api.github.com/users/rw/gists{/gist_id}","starred_url":"https://api.github.com/users/rw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rw/subscriptions","organizations_url":"https://api.github.com/users/rw/orgs","repos_url":"https://api.github.com/users/rw/repos","events_url":"https://api.github.com/users/rw/events{/privacy}","received_events_url":"https://api.github.com/users/rw/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T06:10:25Z","updated_at":"2016-01-28T06:10:25Z","body":"@danring @mmastrac Sorry just getting to this issue! It's on my radar now. Would either one of you like to contribute a patch for Python and/or Go? Please email me (in my GitHub profile) to discuss specifics."}}