Date: Sun, 15 Nov 2015 13:23:03 -0500 From: Allan Jude <allanjude@freebsd.org> To: freebsd-current@freebsd.org Subject: Re: libXO-ification - Why - and is it a symptom of deeper issues? Message-ID: <5648CD87.4020305@freebsd.org> In-Reply-To: <5648CC0F.6050708@freebsd.org> References: <0650CA79-5711-44BF-AC3F-0C5C5B6E5BD9@rdsor.ro> <CAJ-Vmokfo_BGWji9TrgQ40oRxqht9-2iEZVon7aQxR_93Ufxyg@mail.gmail.com> <702A1341-FB0C-41FA-AB95-F84858A7B3A4@rdsor.ro> <CAJ-VmoniBAmWTf9MkCCMYhRbPLc=0%2Bz5kRSijXfqX9VZvm8jDg@mail.gmail.com> <5648C60B.6060205@freebsd.org> <6EDFB74B-2206-46E7-85F7-8DE05FB6D325@gmail.com> <5648CA60.3060800@freebsd.org> <F9E0136C-9BFA-4FE7-A623-9F5D8871A6D1@gmail.com> <5648CC0F.6050708@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XrlC8eblXKc55v61h5s1hWr8SEeTpiIWP Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-11-15 13:16, Allan Jude wrote: > On 2015-11-15 13:14, Garrett Cooper wrote: >> >>> On Nov 15, 2015, at 10:09, Allan Jude <allanjude@freebsd.org> wrote: >> >> ... >> >>> The big difference is, a json parser isn't going to blow up if a new >>> field gets added in the middle, and your awk/grep/sed script probably= will. >> >> That's a plus to those formats, yes, but if someone changes the field = name (which can happen today, on a whim, and would go unnoticed for a whi= le because no tests/spec), you'll run into a KeyError in Python or an equ= ivalent error message in your language of choice. >> >> Thanks, >> >=20 > But, if the same change was made to a pure text output, then our 'colum= n > 3' would suddenly be username instead of ip address, and your program > would not work at intended either. so at least json would give you a > warning. >=20 > So, the need for a spec on the output is not specific to encoded > outputs, changing the output in text is just as disruptful. >=20 Also, libxo now supports the versioning of output, to make it possible for your json parser to detect when a change to the schema has been made.= --=20 Allan Jude --XrlC8eblXKc55v61h5s1hWr8SEeTpiIWP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJWSM2HAAoJEBmVNT4SmAt+QIsQAKtY06eitEB7vx1l15KuMMrY 9eLlxsgFt5Lpu3dGPWlsoOp/mQGPpbSp5sAnrSR1vf6U6GklP2gekAk2j/knbT2U WjX58TXw0P74iDl4m6Umn6zHRVTYE9mKnTjUr2XvcY8KaNY9e5JBAGM4D6/ZUQPa MdqrtZrzzGy3fnIaITjg2g50easXbVg0b/vCASDD3QjfOFAMHY5VtS/dy9QmM99O h6zj1H03gNX0YdeXAMXp3/icop5O/TBpPeG/Spx3nhCFYLxjGLnCXovLCTpipyab 7ivhYzEufrQv/FQK61PW4KH/Oqi5/HngRe2etpaMx1Cenf6wJojj6pp8vd2Kyn/+ OjLs3u9wScKhWQcmfLirvFZJZGmPia1TZZJ619IV+6a5mKHPYtfjwZNDyE+rRRt1 9szBGUoKENta932tjgNoXabErYY0cp4ABuKtuMYf0/H4s7c6k2mP8f/y2E6nMzLh N9Xlck+KmNvob8XMmctG0NPEPxf8NQfIZyAhuOCQXw54KtyBvYj9871T2X3Djclg RJ+89j/0FffMKYzKz+7IP/DIv/wLY0n7rjqdXzuWTeCb3MQNpkb3FG2OTMd7YAsj KvrNLDjYPePfeBU3BjSa4xpc7FFEuIL2z86ftHvPwIpERfrugch7tbao7fKqPVEm h/rh84YpZss2FCQT+OnG =h826 -----END PGP SIGNATURE----- --XrlC8eblXKc55v61h5s1hWr8SEeTpiIWP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5648CD87.4020305>