I read through all those links, and even got your example working (on a phone - no curl etc - so had to write a litle java http client). Consequently, this comment is long. I hope it&#x27;s useful to you!<p>BTW: I personally would like to see your idea usable on a phone - without a full local machine (iterating might be a pain, but your system sounds really fast). Not just serverless, but machineless!  A currently underserved niche.<p>&gt; deciding on just the right features to keep things manageable is incredibly difficult (more so than the tech itself I believe).<p>I agree implementation is the easier part, though we&#x27;ve been stuck so long, I think there must be a simpler way to look at the whole thing, involving some mathematical or algorithmic insight (as relational algebra did for databases).<p>Barrister: I sometimes get lost in special cases, and forget the main point that provides the fundamental help to people: Barrister seems feature-full, but from reading the first paragraph or so, it seems to only output docs - because that&#x27;s all they say it does! If the reader already knows what Thift etc do (i.e. something of an expert, across the field), they could guess that maybe Barrister does more... but the users who just want the main thing you do are easier recruits. Perhaps this is partly why it&#x27;s overlooked...<p>StackHut: I&#x27;m not sure you need a separate IDL, if it is generated automatically - why confuse the user with it?  It seems like a more sophisticated customization tool, that you could leave aside for later? The IDL itself is pretty clear, and although I&#x27;d thought about (eg) java classes as defining a schema, I hadn&#x27;t made the connection that IDL (as from CORBA) also do that.<p>(1). RPC format. I&#x27;m familar with OO serialization and schema languages (unfinshed PhD, book chapters, a library and business), but less so for RPC - so maybe I&#x27;m off-base here.  And standards - even nascent standards - may be worth complying with. But why not omit the meta stuff, and make it even simpler:<p><pre><code>  {
    &quot;stackhut&#x2F;web-tools&quot;:
    {
      &quot;renderWebpage&quot;: [&quot;https:&#x2F;&#x2F;stackhut.com&quot;, 711, 393]
    }
  }
</code></pre>
I&#x27;m really just wondering if there&#x27;s a strong reason for the meta data. It can be helpful to orient the reader, but here it is clear from context - the keys and how it&#x27;s being used. Maybe there are other optional fields you sometimes need?<p>But... for your use-case, perhaps it doesn&#x27;t matter that much, as the bindings hide it from users (but the point of text protocols is human readable, eg for debugging; so the simpler the better). You could use XML, or a binary protocol.<p>(2). JSON by example: This is my great idea for JSON schema, which I&#x27;m amazed no one has done yet: instead of another meta-format, do it by example:<p>Because JSON primitive values are typed, you can use a value to signify type. An object therefore also implicitly defines its type (like a java class). For example, the above JSON can also be used as a schema, because it indicates the two nested objects required, and the types of the primitives (string, number, number). Though I suggest a convention of using &quot;&quot;, 0 and false as values.<p>Those zero values help convey that it&#x27;s a type, not a value. It&#x27;s temping to want to encode information in the value itself (as opposed to the type), such as a default value - but that maybe a mistake, because there is so much more than can be done with strings than with numbers. Keep it super simple.<p>[ Arrays are usually not fixed-length, enabling the next trick to encode optional values and polymorphism. ] The JSON spec allows duplicate keys: so you include the same key with different types for all the polymorphic types. Specifically, you include the null value to indicate it is optional. e.g. version is an optional string:<p><pre><code>  {
     &quot;version&quot;: &quot;&quot;,
     &quot;version&quot;: null
  }
</code></pre>
This is a bit dodgey, because all JSON parsers simply return
one value if duplicate keys are found. You need to write your own parser. But it <i>is</i> valid JSON - and more importantly, it <i>looks</i> like valid JSON. That&#x27;s the key idea of &quot;by example&quot; - it looks like what it represents; there&#x27;s minimal cognitive leap from type to instance.<p>It&#x27;s rare to want polymorphic primitive types (e.g. string and number), so this is more for polymorphic objects. Unlike the common trick of a &quot;type&quot; field for nominal polymorphism, this is structural polymorphism - where only the different fields distinguishes types. NB: there are some tricky cases here, when the fields overlap, and I&#x27;m not sure that client code would want to mess with it.<p>Finally those non-fixed length arrays: polymorphism is represented by the types of a set of values in the array. In other words, the values aren&#x27;t ordered, but just represent the permissible types. eg:<p><pre><code>  [
    { &quot;image_url&quot;:&quot;&quot;, &quot;width&quot;:0, &quot;height&quot;:0 },
    { &quot;text&quot;: &quot;&quot; },
    { &quot;link_url&quot;:&quot;&quot;, &quot;link_text&quot;:&quot;&quot;}
  ]
</code></pre>
That&#x27;s a schema for an arbitary-length list that can contain instances of those three types of objects, with those mandatory fields, of those primitive types.<p>NB: for a schema of the RPC &quot;header&quot; above, the fixed length array schema represents a fixed length array - a special case.<p>(3). primitive datatypes: This idea can be extended, in a second level, with explicit primitive datatypes - this is the next level of schema power that everyone wants. Every value is now a string, and looks something like: &quot;url&quot;, &quot;date&quot;, &quot;email&quot;, and then gets closer to XS, with ranges like &quot;int:1..31&quot; and even those ridiculous regex defining valid values (great idea, awful in practice, like the regex for email). The key thing is it still is JSON and <i>looks</i> like JSON, since the datatype specification language is just a JSON primitive value (string), and the syntax and meaning is obvious and familar.<p>BTW minor typo on your website: s&#x2F;intergrated&#x2F;integrated&#x2F; (like integer)