[Interop-dev] NetworkGraph: Infinite weight

Nemesis (spam-protected)
Fri Jul 3 19:02:10 CEST 2015


I checked recently the JSON RFC, which explicitly forbids Infinity and NaN.
See here: https://tools.ietf.org/html/rfc4627

"Numeric values that cannot be represented as sequences of digits (such
as Infinity and NaN) are not permitted."

Even though some implementations allow it, I tried to process a JSON
structure which contained Infinity with javascript and it raised an
exception.

So, for these two reasons, and because NetJSON would be based on the
JSON RFC, it probably makes sense to explicitly forbid links with
infinite weight.

It would also simplify a lot consumer implementations, which is
something I believe we should strive for.

What do you think?

Federico



On 07/03/2015 06:52 PM, Henning Rogge wrote:
> Hi,
>
> we could just allow the JSON "infinity" value for weights... you just
> have to test for them when doing math or displaying.
>
> Henning
>
> On Fri, Jul 3, 2015 at 6:50 PM, Nemesis <(spam-protected)> wrote:
>> How to deal with infinity?
>>
>> Perhaps the best thing would be to forbid links with infinite weight because
>> they are not usable so it's like not having them.
>>
>> I opened this issue:
>> https://github.com/interop-dev/netjson/issues/17
>>
>> Federico
>>
>> _______________________________________________
>> Interop-dev mailing list
>> (spam-protected)
>> https://lists.funkfeuer.at/mailman/listinfo/interop-dev
>>






More information about the Interop-dev mailing list