[Bug 221676] arp: invalid json output from libxo when bridge is present
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Aug 26 16:55:33 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221676
Duncan Paterson <duncan at splash.fish> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |duncan at splash.fish
--- Comment #1 from Duncan Paterson <duncan at splash.fish> ---
Created attachment 185787
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=185787&action=edit
Adds the quote directive to xo fields to make sure that strings are quoted in
json output
I can reproduce this in general for libxo.
The number detecting heuristic it uses allows for C style numeric suffices (for
example 34f, 12d). This allows any strings ending the characters in the set
[diouDOUeEfFgG] to be treated as numbers (left unquoted in json). This has two
drawbacks firstly leaving strings such as bridge unquoted because it ends in e,
secondly it allows numbers with C style suffices to be output unqoted these are
not valid json.
for example:
{
"key": 35f
}
is invalid.
I've added the quote directive to all of the relevant xo_emit calls as per the
documentation on libxo at http://juniper.github.io/libxo/libxo-manual.html.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-net
mailing list