Re: JSON mapping document is now ready for review

Hi Alain, many thanks for the feedback. It’s always useful to have an implementers perspective when writing specifications!

I have captured your proposal in our GitHub repository (ISSUE #130, https://github.com/w3c/csvw/issues/130 <https://github.com/w3c/csvw/issues/130>) wherein you’ll see that I am thinking that this form of the output might be tied to the use of the primary key directive - because we know that in this case, the primary key must be unique.

We anticipate further review of the mapping documents after FPWD publication (hopefully very early Jan), your proposal will form part of that review. Now that it’s in GiHub we can’t loose it.

Merry Christmas, Jeremy

> On 17 Dec 2014, at 14:36, alain.couthures@agencexml.com wrote:
> 
> Hello!
>  
> I have been processing CSV files recently and I decided to store them in an extended DOM structure with arrays, maps and entries nodes (as XPath 3.1 will support them).
>  
> This work of mine sounds to me similar with JSON mapping and please let me describe what I added for performance purposes:
>  
> Adding a way to specify a column as a unique key (I use the media type for parameters such as header or separator too) allows to map the CSV data into a JSON object where key values are distinct properties :
>  
> key,a,b
> 1,alpha,beta
> 2,alpha2,beta2
>  
> becomes
>  
> {
>   key:
>     {
>        "1": {a: "alpha", b: "beta"},
>        "2": {a: "alpha2", b: "beta2"}
>     }
> }
>  
> This is a very efficient way to access data within a Javascript program. I successfully processed within a browser more than 30000 rows against filtering maps in few seconds.
>  
> What do you think?
>  
> Kind regards,
>  
> Alain Couthures
> agenceXML

Received on Thursday, 18 December 2014 10:10:24 UTC