bugGNU Parallel - Bugs: bug #42955, --json parse single lined json

 
 

bug #42955: --json parse single lined json

Submitter:  Ole Tange <tange>
Submitted:  Sun 10 Aug 2014 12:23:22 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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>
Group 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>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code