Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0A1C0200C22 for ; Tue, 21 Feb 2017 09:06:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 088F5160B68; Tue, 21 Feb 2017 08:06:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 51F9F160B3E for ; Tue, 21 Feb 2017 09:06:30 +0100 (CET) Received: (qmail 76892 invoked by uid 500); 21 Feb 2017 08:06:29 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 76875 invoked by uid 99); 21 Feb 2017 08:06:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2017 08:06:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B0D03C0258 for ; Tue, 21 Feb 2017 08:06:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.679 X-Spam-Level: * X-Spam-Status: No, score=1.679 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id s03WqleQypWd for ; Tue, 21 Feb 2017 08:06:27 +0000 (UTC) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2E4825F286 for ; Tue, 21 Feb 2017 08:06:27 +0000 (UTC) Received: by mail-it0-f43.google.com with SMTP id 203so98451320ith.0 for ; Tue, 21 Feb 2017 00:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=M0++8+JXS06fyZVQ0i/5wnnITUsb5WjihRMXGryIxis=; b=aAj8HRbopf3Lo/L+tVMW0fxoxN0DcMDb7jSNuqL5fA/rO1x9Ko8DN/AUm3QQn4tN6O 4syF+Z5pudQHXgYUvB4b3ufEHD5QLy8vXePrFY5Jmhxzmh2QHGl0iIcdBtbKcb8sW40c gzx+QAHfckyQTZJxrWgbi/gr0zNPC7atxrkELUZJJGewjXVnzuI5DzGwz18msV3fYvUA +5ouzpWg5QxMDUaJQ4D1G94tRyqZu+pGNwBcsBIqPsLl05mgGNofJ7A7GxiUij/0b0mj m7vQFD0Y39vlCs4/Zf4+S9rp7g+h5fur2cu9pNIR/KcotQ0jD+Hr3Tou20RdASRcGKxG 9pKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=M0++8+JXS06fyZVQ0i/5wnnITUsb5WjihRMXGryIxis=; b=t478tEotK2Q6xCa0h43ElFbpGvoUsA9UOaeAuOTGUo3axMnEugmbGrUTIkxY7QxMiV AaLZR622U+/mgfsqop1mCBCOUiL6AIwbnXW4bwWaXfVhspsJkz+ZYxbezhAAT2F5Tb52 7g/qdUHhY3ulzFYlHqsnkqcjT37WfUOhk+oEbjYdQQ3T/0h+OMYDCEocIJ/4MfKWDa9m h8i6UacKFhu9Pg9pewJd9NM92dRIcNWF60D9gVRIukHS8vK6Mk5ETHxWElQ/d9b+DqRY 997XviKps8ldH3x8xWH0p5A7UPGd4vq5tFioIrF0f2HPssfpgkh0bLf2SPxNZNpVE7tG OG+g== X-Gm-Message-State: AMke39ljqL+q19B7vbjoI7SfufqyROsYlkDrjlV78fdBoDf7Nd5hRu3bFg3BqMAzqya7Dl6NocPLtfHEVoTL4w== X-Received: by 10.36.124.16 with SMTP id a16mr27018597itd.90.1487664384926; Tue, 21 Feb 2017 00:06:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.20.68 with HTTP; Tue, 21 Feb 2017 00:06:24 -0800 (PST) In-Reply-To: <956B198B-CE40-46FA-A94A-822DFA708028@leangen.net> References: <956B198B-CE40-46FA-A94A-822DFA708028@leangen.net> From: Achim Nierbeck Date: Tue, 21 Feb 2017 09:06:24 +0100 Message-ID: Subject: Re: [utils] support comments in JSONOParser? To: dev@felix.apache.org Content-Type: multipart/alternative; boundary=001a114a9d42356a50054905db1c archived-at: Tue, 21 Feb 2017 08:06:31 -0000 --001a114a9d42356a50054905db1c Content-Type: text/plain; charset=UTF-8 Hi, I wouldn't do it, in the end you'll endup re-inventing the wheel a 50th time. If you think the minimum parser isn't sufficient, it's time to think of using another one. As I already pointed out previously we do have an apache project for JSON stuff. At this point if it is really needed and not a simple string parsing and done with it. Go for a full featured JSON lib, which is already OSGi ready. regards, Achim 2017-02-21 0:42 GMT+01:00 David Leangen : > > Agree that it would be a very nice feature to have. > > HOWEVER, this is how the scope creep starts. The original thought was to > have a very simple parser. > > > What about a separate (possibly even configurable) pre-parser instead? > > > Cheers, > =David > > > > On Feb 21, 2017, at 7:17 AM, Stefan Seifert > wrote: > > > > the new json parser added to Felix Utils fails when the JSON files > contain comments like /* comment */. > > > > i known that the JSON format [1] officially does not support comments at > all, but most JSON parsers nowadays seem to support them by just skipping > comments when parsing a JSON file. should the felix parser support this as > well? perhaps configurable via a strict and non-strict mode? > > > > stefan > > > > [1] https://tools.ietf.org/html/rfc7159 > > > > > > -- Apache Member Apache Karaf Committer & PMC OPS4J Pax Web Committer & Project Lead blog Co-Author of Apache Karaf Cookbook Software Architect / Project Manager / Scrum Master --001a114a9d42356a50054905db1c--