Date: Tue, 28 Dec 2010 11:49:14 +0300 From: Eygene Ryabinkin <rea@freebsd.org> To: Doug Barton <dougb@FreeBSD.org>, David Demelier <demelier.david@gmail.com>, freebsd-ports@freebsd.org Subject: Re: portmaster: print /usr/ports/UPDATING on update Message-ID: <fSQutpfxyJZuPSGGGF00tQoAyns@QsmfhJNucgI88DfvPJdT1/nyboE> In-Reply-To: <20101228082755.GA4381@straylight.ringlet.net> References: <4D15D275.6000308@gmail.com> <4D194421.9080304@FreeBSD.org> <SaPpQ%2B%2BiANujx2z50Bs5SbHA8lc@QsmfhJNucgI88DfvPJdT1/nyboE> <20101228082755.GA4381@straylight.ringlet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter, good day. Tue, Dec 28, 2010 at 10:27:55AM +0200, Peter Pentchev wrote: > - I personally would prefer a human-readable file (and yes, I *can* > read XML; that doesn't mean it's easy or I *want* to :) > ...so how about a JSON representation? Human-readable, human-editable, > but still capable of being formalized and validated JSON is a bit better (it has no tag overwhelming), but why not just adopt the current mail-like entry format with each entry idented at two spaces and preceded by a timestamp in format 'YYYYMMDD:'? It is fairly easy to write a validator for such entries, since it is rather simple to parse it and the validation logics will be programmed in any way if we will still lean toward the human-readable format. There is JSON Schema, but this way we will need something like {{{ {"date": 20100101, "affected":{ "category":"www", "name":"elinks", "version":"blah" } "body":"a long body comes here" } }}} to validate the individual "category", "name", "version" and others. Such entries are human-readable, but not as pretty as the current UPDATING entries, in my opinion. > - ...and as for an implementation, there is a mini-JSON library in > NetBSD's netpgp implementation - > src/crypto/external/bsd/netpgp/dist/src/libmj/ in NetBSD CVS Does it has the schema validation? From what I seen at the NetBSD CVS, there is not XML Schema implementation yet. -- Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fSQutpfxyJZuPSGGGF00tQoAyns>