develooper Front page | perl.perl6.users | Postings from September 2017

Re: json file pase

Thread Previous
From:
Shlomi Fish
Date:
September 2, 2017 09:47
Subject:
Re: json file pase
Message ID:
20170902121836.034a5692@telaviv1.shlomifish.org
[resending because the original appears to not have arrived]

Hi N6Ghost!

I find you hard to understand - please try to write more coherently.

On Sat, 2 Sep 2017 01:45:35 -0700
<n6ghost@gmail.com> wrote:

> Hi all,
> 
> I have been away from Perl for long time, but I have a problem that may be up
> its allay for a return.
> 
> I have an export of data, (test dataset 100MB prod will be 3GB to 5GB appox)
> I can export data in csv, json or xml.  Now the data is log data being
> exported from splunk. While splunk can do some amazing things I need to pull
> data from inside events…. I am actually looking for “ldap servers” or other
> types of data points That while splunk can get me part way there It can
> really get me all the way. And hey it’s a good reason to Maybe write up some
> Perl6. As a test… 
> 
> While I did try, c# and .net first it complains, that there is whitespace and
> that’s not part of the specs. So, I wanted to give perl6 a go, which I been
> meaning to anyways and this might be a good use case for it.
> 
> Figured json::tiny might be the way to go,
> 
> I really don’t have very much, just the very very beginning:
> ⇒ Latest perl6, windows 10, and atom editor
> /code
> use v6;
> use strict;

v6 is strict by default.

> use json::tiny;
> 

This lacks proper capitalisation:

https://github.com/moritz/json

It may work on windows, but not on Unix systems.

> say "Running Perl6 script with v6 on";
> say "using json::tiny";
> say "................................";
> 
> {
> 
> my $uri "Z:\\VM_Shared\\exports\\4624\\rt_1504193701_299149.json"

you are missing a "=" and a ";" here.

> my %res = file.get 

what is "file"? You are also missing a semicolon.

> 
>   
> }
> /end code
> 
> 
> And json::tiny does not have very much in the way of docs, and most of the
> examples are more targeted For webapp use cases. I want to chew threw a file
> and file data and export that into a new file which I can then Put in excel.

It has tests though and its API appears to be minimal.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About