N3.js icon indicating copy to clipboard operation
N3.js copied to clipboard

feature/add handle quads

Open jeswr opened this issue 1 year ago • 3 comments

Supercedes #319

jeswr avatar Mar 24 '23 10:03 jeswr

Given #330, maybe this could become:

const writer3 = new N3.Writer({ syntax: 'flexible' }); // Also output quads that cannot be expressed in the chosen syntax (default)
const writer4 = new N3.Writer({ syntax: 'drop' });     // Drop components or quads that cannot be expressed in the chosen syntax
const writer5 = new N3.Writer({ graphs: 'strict' });   // Throws an error when a quad cannot be expressed in the chosen syntax

RubenVerborgh avatar Mar 24 '23 11:03 RubenVerborgh

Should we add proper validation to writer at the same time (e.g. for the cases in #330)?

jeswr avatar Mar 24 '23 11:03 jeswr

Yes, that's the direction. But we don't need to have that right now; i.e., this can be the meaning of the strict option, and not validating everything can be a bug until fixed.

RubenVerborgh avatar Mar 24 '23 11:03 RubenVerborgh