Thanks Michael,

That helped me find this page: 
http://chapel.cray.com/docs/master/modules/standard/IO.html#i-o-overview 
<http://chapel.cray.com/docs/master/modules/standard/IO.html#i-o-overview> 
(Google is still not that friendly to Chapel, getting better)  In this example:

var myFile = open("test-file.txt", iomode.r);

// create a reading channel starting at file offset 0
// (start and end offsets can be specified when creating the
// channel)
var myReadingChannel = myFile.reader();

var x: int;

// Now read a textual integer. Note that the
// channel.read function returns a bool to indicate
// if it read something or if the end of the file
// was reached before something could be read.
var readSomething = myReadingChannel.read(x);
I see that x is a primitive. Can you read JSON into an object or was that 
blocked by existential questions?  Good place to have existential questions: In 
Chapel...

Is that sample application somewhere I can learn from it?

Thanks,
b

~~~~~
May All Your Sequences Converge

> On Aug 1, 2017, at 10:14 AM, Michael Ferguson <[email protected]> wrote:
> 
> Hi -
> 
> I'm not sure I can make a complete list but I would like to point
> out that JSON is supported with Chapel's formatted I/O system.
> Try e.g. writef("%jt", myVariable);
> 
> Reading works OK but there are some philosophical questions that
> are currently unresolved to do with - in what circumstances can
> reading a Chapel array resize it?
> 
> I believe the built-in list type works around those issues though
> and I've used the formatted-I/O JSON support in an application
> that was reading tweets.
> 
> Cheers,
> 
> -michael
> 
> 
> 
>> Can someone share a list of currently supported serialization formats,
>> like HDF5 (I know not current), Parquet, etc.
>> 
>> Second, we data storage is supported.  I see CSV and HDFS, but no SQL or
>> others.
>> 
>> Thanks!
>> b
>> 
>> ~~~~~
>> May All Your Sequences Converge
>> 
>> 
>> --------------------------------------------------------------------------
>> ----
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Chapel-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/chapel-users
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to