Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7AC5F17D24 for ; Tue, 11 Nov 2014 19:19:46 +0000 (UTC) Received: (qmail 78838 invoked by uid 500); 11 Nov 2014 19:19:46 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 78800 invoked by uid 500); 11 Nov 2014 19:19:46 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 78787 invoked by uid 99); 11 Nov 2014 19:19:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2014 19:19:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mmocny@google.com designates 209.85.223.178 as permitted sender) Received: from [209.85.223.178] (HELO mail-ie0-f178.google.com) (209.85.223.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2014 19:19:41 +0000 Received: by mail-ie0-f178.google.com with SMTP id rp18so12081344iec.37 for ; Tue, 11 Nov 2014 11:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=WAQTrj7xfg4cESuKLKjM9tpRmFQ+/9Ube+SNWDIBCu8=; b=pqpMgBiSIWxnE4VrAo2DNj+m3L0ThiUYF1H6CKnw5b5r9533tTH8uQoeBeSi92LQSf t+DAEfxCXfKGcY+ibny9twsxkWCWsVOt419aZrdAwgu0q1bsOwpE0ABx4zpLuS4e5NAh Z8jpA3XwfMD75uV0dlQ2INdQtnmoNf/wmdIhSYbOzm6BUz+NCCIuP5KI5zN2+FGqNwt7 QiJsNsQ3u+3nmWobgi5VOyPlWm0Ub1aArsk9ZNtVXbMzMstd3+f/IdxY1HT4vqwcijWa SoCnVVFQqgWrHHUFzliAt2a5NB5H1W9qkdX9YpOY4SKomBAawPFvpW3mXk/k1CvcMhy/ Uunw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=WAQTrj7xfg4cESuKLKjM9tpRmFQ+/9Ube+SNWDIBCu8=; b=B7mQntZkmAaBwC+W2H2MO2jFBDcTER/TwRgghunIOzXwKBeNXeFH/aHEJWl/bvQxJ5 kpw2gT/a1XV5PK0M3606Cev5kB8n5HUGVUhiDEld0xZKcb9N+JCCozqyRX6l7mUdPISF qyVFpbWL/oesmdPNum/NMwzQ/KkDXectrGKjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=WAQTrj7xfg4cESuKLKjM9tpRmFQ+/9Ube+SNWDIBCu8=; b=ilwkRkJA3PeyBqnQb91uPQw/a/HrQZ2RxfKtGapfDhgwKztf6pWvrvlrTQWX4JOcZy +YS+9+uPZCP/A5L/p/pl1EYfyZ2aLQalpiqptym4+CfhPKgMkM67CGb73jL5l+MIXXWQ nMvGbT2h/fW/NXeEZ+FL9M9aCNP3xsz7uhgD+v7Bkh9o/euUxAkNoy0J9SuTa+dyXM5m 7LT/PvIml5/RaLTJJuE4lu/R7mYT9ELcBEOpk2g5zMQJib9D1wIDfTJEfIOuCchq/VYX L/Ov5AzCle2S9iO8e/0IrlY/sfgEYnjf4XhiYV8k2YEUtmSyLSRCqoMCkQTUbaoY+nM0 Bd+g== X-Gm-Message-State: ALoCoQl2TEgmx9NW/2e/3P1JgTg5R6EF1l8H7CzED+OSloZjiF+LbtBmeXqwONyO5dpxD0Y8Yzct X-Received: by 10.50.136.133 with SMTP id qa5mr34977472igb.2.1415733515123; Tue, 11 Nov 2014 11:18:35 -0800 (PST) MIME-Version: 1.0 Sender: mmocny@google.com Received: by 10.64.24.45 with HTTP; Tue, 11 Nov 2014 11:18:14 -0800 (PST) In-Reply-To: References: From: Michal Mocny Date: Tue, 11 Nov 2014 14:18:14 -0500 X-Google-Sender-Auth: wVRtZS62zjfNVxBBBfl8tZSAUy4 Message-ID: Subject: Re: plugin.xml config-file for json files To: dev Content-Type: multipart/alternative; boundary=089e0141a76a442ae605079a25e2 X-Virus-Checked: Checked by ClamAV on apache.org --089e0141a76a442ae605079a25e2 Content-Type: text/plain; charset=UTF-8 I'd also recommend hooks for now. tag sounds potentially more resilient to change, but since you have to explicitly reference the path to target I don't think its any better in practice. Additionally, we've expressed interest in replacing our xml based configs with json manifests, and while that work may not be in a hurry, it seems counterproductive to extend the scope of plugin/app configs right now. -Michal On Tue, Nov 11, 2014 at 2:09 PM, Axel Nennker wrote: > I would not modify the value. Can config-file replace values? > Just adding stuff would be good enough for my (current) purposes. > I would throw on existing keys. > When two plugins add the same key then plugman should throw and I don't > want to track all changes over all plugins. > > 2014-11-11 19:58 GMT+01:00 Jesse : > > > I would like to see a new element titled 'json-file' and matching parser > > that does the work. > > something like this? > > > > > > "{the:{stringValue:2,b:"added"},or:{modified:true}}" > > > > > > > > @purplecabbage > > risingj.com > > > > On Tue, Nov 11, 2014 at 9:02 AM, Shazron wrote: > > > > > Have you considered plugin hooks? > > > I just implemented this yesterday to modify the root config.xml file: > > > > > > > > > https://github.com/apache/cordova-plugins/blob/master/local-webserver/plugin.xml > > > > > > On Tuesday, November 11, 2014, Axel Nennker > > wrote: > > > > > > > Hi, > > > > > > > > if I remember correctly then this was discussed before but I can't > find > > > the > > > > email exchange. > > > > > > > > We are trying to use our cordova app on firefoxos and would like to > > > modify > > > > manifest.webapp which is a json file. > > > > > > > > In plugin.xml we can only modify xml files using the config-file > > element. > > > > > > > > What are your preference on how to implenent this? > > > > - reuse config-file with new attribute type="json" (default "xml") > > > > or new element e.g. "config-file-json" > > > > - only adding to the json and throw if key already exists? > > > > - ... > > > > > > > > Should I file an issue and implement it? > > > > > > > > cheers > > > > Axel > > > > > > > > > > --089e0141a76a442ae605079a25e2--