3

I've used Protobuf before, and I was looking into Thrift, but I was wondering what the options were for IDLs that compile to (at least) C#, JS, Objective C and Java, but also serialize/deserialize JSON in all of those languages. Thrift mostly does that, but doesn't support JSON in OC, and I was concerned (perhaps unwarranted) about the maturity of its JSON interfaces. Are there any IDLs that use JSON as their primary serialization, but also compile to strongly typed bindings in all of the languages listed above?

Thanks!

  • Welcome to SO! [Questions asking for tools, tutorials, etc. are considered out-of-scope for our website](http://stackoverflow.com/help/on-topic). If you have any programming problems, though, be sure to drop us a line. – Conduit Oct 16 '14 at 17:04
  • Ehh? This is a question about programming. IDLs are tools for programmers. o.O – Stella Clemens Oct 16 '14 at 17:12
  • I mean dealing explicitly with code - sorry for the confusion... Such questions are SO's forte. Many topics that don't deal with code fall into the "off-topic" categories described at the link on my last comment. – Conduit Oct 16 '14 at 17:14
  • O.O IDLs generate code. They are explicitly and exclusively involved with programming and specific code. I honestly have no idea what you mean. I'm asking for advice on which tool to use for my application, in writing code. Unless you mean questions on SO should come with a code sample, in which case I can make something up to ask the exact same question... – Stella Clemens Oct 16 '14 at 17:17
  • But the question itself is a request for a recommendation, not help with a software/code problem. From the help center: *Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.* – Conduit Oct 16 '14 at 17:23
  • Balls... Alright, thanks. – Stella Clemens Oct 16 '14 at 17:26
  • I'm not trying to be a jerk or anything... SO is moderated by the community, and I'm one of the many who have been assigned to help new users ask questions that are appropriate for SO so they can become productive, functional members of our community. This may be out-of-scope here, but I'd guess that you could probably make some headway on a forum :) – Conduit Oct 16 '14 at 17:28
  • BTW, "OC" is overloaded. It could also mean OCaml. – JensG Oct 17 '14 at 08:10
  • @Coduit - if your response to *this* question is representative of the SO community (and I don't really doubt that it is), SO has truly gone off the rails into design-by-committee-neverneverland. – BCG Oct 18 '14 at 04:55
  • @BCG I don't really think so... We are creating a resource of questions that have absolute answers. Questions asking *for* tools as opposed to asking *about* tools don't have absolute answers, and are thus out-of-scope. The vision of SO is still directed, unified, and organized - ergo not DBC. – Conduit Oct 21 '14 at 18:06
  • There is an absolute answer to the question "does there exist a tool with these qualities or is there a tool that can be used in its place?" I'm not even really asking for opinions (though I wouldn't mind them). – Stella Clemens Oct 22 '14 at 20:32
  • @Conduit ok thanks for clearing that up, because it seems like SO has turned into a bunch of legal beagles sniffing out anything that could be considered "off topic" and throwing it into the trash bin. Maybe its just me, but 50% or more the SO google hits that I get have been closed as not constructive etc. – BCG Oct 23 '14 at 15:37
  • @BCG I hear you - some are a little too gung-ho with the close votes. – Conduit Oct 23 '14 at 20:51
  • @StellaClemens Stupid though it may be, you can often get around the flaggable offenses with some careful rewording. "does there exist a tool with these qualities" = flaggable as tool request. "Does this tool have these qualities" = non-flaggable legitimate question (though likely to receive down-votes if research effort is not shown). – Conduit Oct 23 '14 at 20:55

1 Answers1

0

Regarding Thrift: If there are any serialization protocols could be considered "primary", it would certainly be the binary format. However, we strive to introduce a common minimum set of protocols and transports for each language, one of which is JSON.

Next, please keep in mind that Thrift's JSON format might not be what you expect. The JSON format is especially designed for Thrift, the main goal is a compact representation of the data. The SimpleJSON protocol also available for some languages is more verbatim, but initially designed to be write only (although that viewpoint right now changes slightly).

I was concerned (perhaps unwarranted) about the maturity of its JSON interfaces

There is nothing to be concerned of, honestly. There are a few PHP-related issues with regard to proper string encoding but otherwise it works just fine - when available for the language of choice. If you don't mind, it is not that hard to write a JSON transport and we always welcome quality contributions. If you need help during that process, ask the mailing lists.

Community
  • 1
  • 1
JensG
  • 13,148
  • 4
  • 45
  • 55
  • OK, so it sounds like Thrift is definitely not what I'm looking for. Do you know if such a tool (an IDL that compiles and can serialize/deserialize an existing JSON format) does exist? – Stella Clemens Oct 22 '14 at 20:35