[Interop-dev] [BMXd] make metric a optional property of NetworkRoutes, NetworkGraph, and each Route object

Henning Rogge (spam-protected)
Tue Apr 5 12:43:55 CEST 2016


On Tue, Apr 5, 2016 at 12:38 PM, Mitar <(spam-protected)> wrote:
> I think this is a question of should the producer of JSON be smart and
> do something more complicated, or should the consumer be smart. I think
> in this case producer should not be smart and make it so that it is
> simple to generate the file. We can always provide libraries to parse
> JSON files in some easier way, if it there are common tasks for
> consumers to do (like showing all links from a node no matter the
> routing protocol).

Some time ago I added a possibility for the Olsrd2 producers to get
only a single "route/graph" object... and to get a list of all
"metrics" so you can enumerate the "route/graph" objects.

So we can do both, provide the full output for smart consumers and
provide filtered output for stupid ones.

Still I don't think adding more "metric variants" to the same
route/graph object is a good approach, it doesn't add any capability
AND it is increasing the complexity of NetJSON (because we can do the
same things suddenly in multiple ways).

Henning



More information about the Interop-dev mailing list