Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Perl problem with pscheduler

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Perl problem with pscheduler


Chronological Thread 
  • From: Mark Feit <>
  • To: Pete Siemsen <>, Andrew Lake <>
  • Cc: perfsonar-user <>
  • Subject: Re: [perfsonar-user] Perl problem with pscheduler
  • Date: Tue, 9 Jul 2019 22:08:01 +0000

Pete Siemsen writes:

 

Thanks, we thought the comments-in-JSON was strange when we learned about it.

 

pScheduler (but not pSConfig) strips out any pair whose key begins with a pound sign as a low-budget way to allow comments.  It only does this on input, so everything it produces can still be treated as proper JSON.  This behavior isn’t part of ECMA 404, and why there wasn’t a mechanism for comments built into JSON is one of life’s great mysteries.

 

We will save a copy of the file, then delete the "commented" parts and forge ahead.

 

You can strip out commented pairs as pScheduer would with this command:

 

jq 'walk(if type == "object" then with_entries(select(.key | test("^#") | not)) else . end)' infile > outfile

 

--Mark

 

 

 

 




Archive powered by MHonArc 2.6.19.

Top of Page