[chef-dev] Re: JSON Comments


Chronological Thread 
  • From: Peter Donald < >
  • Cc:
  • Subject: [chef-dev] Re: JSON Comments
  • Date: Thu, 22 Nov 2012 06:14:40 +1100

Hi,

On Thu, Nov 22, 2012 at 6:06 AM, Marvin W. Hile < " target="_blank"> > wrote:
I looked on Stack Overflow and got about ten contradictory answers regarding
whether or nor JSON files can have comments.

Comments are not part of the json standard. See http://json.org/
 
We are not trying to do anything magical. We will leave the comment headers out
of our JSON files if it proves to be too complex, but I figured I might as well
ask if OpsCode in particluar or Chef developers in general have a simple,
canonical method of adding comments to JSON files.

We use the ruby variants when defining roles, environments etc. This is partially so we can have comments in there as it is just ruby code. At the current time we have not figured out a good way to comment our data bag values.

--
Cheers,

Peter Donald



Archive powered by MHonArc 2.6.16.

§