From: Christopher Peplin Date: Tue, 5 Aug 2014 01:41:35 +0000 (-0400) Subject: Explain when to use JSON vs. binary. X-Git-Tag: 5.0.2~275^2~8^2~29 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=570048644e960862858dfd984c34f55f6b63144f;p=apps%2Fagl-service-can-low-level.git Explain when to use JSON vs. binary. --- diff --git a/README.md b/README.md index 3e496bd5..3e169709 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,13 @@ interfaces (e.g. USB or Bluetooth) as JSON or Protocol Buffers (protobuf). ## Binary (Protocol Buffers) -The Protocol Buffer format is specified in the file `openxc.proto`. Those are -published using the standard length-delimited method (any protobuf library -should support this). +The binary format is encoded using [Google Protocol +Buffers](https://code.google.com/p/protobuf/). The format is specified in the +file `openxc.proto`. Those are published using the standard length-delimited +method (any protobuf library should support this). + +The binary format is best if you need to maximize the amount of data that can be +sent from the VI, trading off flexibility for efficiency. ## JSON @@ -19,6 +23,9 @@ This document describes the JSON format and includes a high level description of each type and field. Each JSON message published by a VI is delimited with a `\0 ` character. +The JSON format is best for most developers, as it is fairly efficient and very +flexible. + ### Extra Values Any of the following JSON objects may optionally include an `extras`