Re: [Json] Using JSON in log files

Ladislav Lhotka <lhotka@nic.cz> Thu, 21 November 2013 10:20 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BA07D1AE12D for <json@ietfa.amsl.com>; Thu, 21 Nov 2013 02:20:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.996
X-Spam-Level:
X-Spam-Status: No, score=-0.996 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HOST_EQ_CZ=0.904] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7SYbCO4F8RtP for <json@ietfa.amsl.com>; Thu, 21 Nov 2013 02:20:36 -0800 (PST)
Received: from trail.lhotka.name (nat-5.bravonet.cz [77.48.224.5]) by ietfa.amsl.com (Postfix) with ESMTP id 9F0EF1AE122 for <json@ietf.org>; Thu, 21 Nov 2013 02:20:36 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by trail.lhotka.name (Postfix) with ESMTP id 0D91054039F; Thu, 21 Nov 2013 11:20:29 +0100 (CET)
Received: from trail.lhotka.name ([127.0.0.1]) by localhost (trail.lhotka.name [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RjkT5HMKm3sr; Thu, 21 Nov 2013 11:20:21 +0100 (CET)
Received: from localhost (unknown [172.29.2.201]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by trail.lhotka.name (Postfix) with ESMTPSA id AE21D5401C2; Thu, 21 Nov 2013 11:20:17 +0100 (CET)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Tim Bray <tbray@textuality.com>, Bjoern Hoehrmann <derhoermi@gmx.net>
In-Reply-To: <CAHBU6iuQ+kFgoSVFSBJoL6666pQC0YSXkZYNjDbUqNUGoo+-aA@mail.gmail.com>
References: <CAMm+Lwj49w5qq3V8tLta_GPq3TT5A0FXuKww5RXHbe74dQ5jjA@mail.gmail.com> <g0qp8952rlt6j93estret25ushl8d1qf82@hive.bjoern.hoehrmann.de> <CAHBU6iuQ+kFgoSVFSBJoL6666pQC0YSXkZYNjDbUqNUGoo+-aA@mail.gmail.com>
User-Agent: Notmuch/0.16+154~g96c0ce2 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-apple-darwin12.3.0)
Date: Thu, 21 Nov 2013 11:20:16 +0100
Message-ID: <m2iovmukdb.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Cc: Phillip Hallam-Baker <hallam@gmail.com>, JSON WG <json@ietf.org>
Subject: Re: [Json] Using JSON in log files
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Nov 2013 10:20:38 -0000

Tim Bray <tbray@textuality.com> writes:

> Check how XMPP skates around XML’s single-root-element rule.  Me, I’d just
> have a log file containing a sequence of JSON texts.

True. However, compared to XML, JSON has an additional issue of "value-separator" (comma) that can only appear between members. Perhaps it would be useful to allow for a comma right before the closing brace/bracket.

Lada

>
>
> On Wed, Nov 20, 2013 at 9:02 AM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
>
>> * Phillip Hallam-Baker wrote:
>> >This is not an extension I would want to use in an on-the-wire format. But
>> >for log files it is essential. Particularly in my case where the logs are
>> >digitally signed notary records.
>>
>> I use http://yaml.org/ for such purposes. It is a superset of JSON, in
>> a way. Converters to JSON, which you would need one way or another, are
>> readily available. You could also just cheat and say "It's JSON without
>> the encapsulating []".
>> --
>> Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
>> Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
>> 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
>> _______________________________________________
>> json mailing list
>> json@ietf.org
>> https://www.ietf.org/mailman/listinfo/json
>>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C