Adding JSON driver protocol spec to the docs

@neumino -- could you please review?
Could you indent this code? It's kind of hard to read.