bugGNU Parallel - build and execute command lines from standard input in parallel - Bugs: bug #42955, --json parse single lined json

 
 

bug #42955: --json parse single lined json

Submitted by:  Ole Tange <tange>
Submitted on:  Sun 10 Aug 2014 12:23:22 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 24 Oct 2014 11:11:17 AM UTC, comment #3:

What can be done with 'jq'?

Maybe just write a section in the man page on jq?

Ole Tange <tange>
Project Administrator
Mon 11 Aug 2014 02:45:04 PM UTC, comment #2:

tools.ietf.org/html/rfc6901 JavaScript Object Notation (JSON) Pointer

{friends/2/age}

Ole Tange <tange>
Project Administrator
Sun 10 Aug 2014 12:27:36 AM UTC, comment #1:

Or use the JSON module and simply give access to that through perl:

{friends:2:age}
{= $_=$json->{friends}[2]{age} =}

Ole Tange <tange>
Project Administrator
Sun 10 Aug 2014 12:23:22 AM UTC, original submission:

Input:

{ "name": "Bob", "sex": "Male", "address": { "city": "San Jose", "state": "California" }, "friends": [ { "name": "Alice", "age": "20" }, { "name": "Laura", "age": "23" }, { "name": "Daniel", "age": "30" } ] }

{name}=Bob
{sex}=Male
{address}=?
{address?city}=San Jose
{address?state}=San Jose
{friends?0}=?
{friends?0?name}=Alice
{friends?0?age}=20
{friends?1?name}=Laura
{friends?1?age}=23
{friends?2?name}=Daniel
{friends?2?age}=30

Ole Tange <tange>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tange (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1