#cjw6kwhoa two new parsers - congratulations aimee!
[jgarber] joined the channel
#[jgarber][aimee] Are you looking for any feedback or help on your new parser?
cal joined the channel
#[jgarber]I’m looking at a part of the microformats2 parsing specification regarding child elements where those child elements have both a property class and a root class name.
#[jgarber]I can’t find a test case for this in the test suite and can’t conceive of a use case where an `e-*` property also has a root class name.
#[jgarber]In that case, a parser adds the element as a hash `{ }` and follows the rules for populating that hash with the addition of a `value` key.
#[jgarber]> else if it’s an `e-*` property element, re-use its { } structure with existing `value:` inside.
#[jgarber]My question is, are there any examples that match this case?
[KevinMarks] joined the channel
#[KevinMarks]Was adactio's book proposal a bit like that?
#sknebeland actually, after re-reading the spec I'm not sure about which interpretation the spec means anymore...
#sknebelI guess it's useful if value is always a string
#sknebelbut this is clearly an edge case we don't actually use in practice
#[jgarber]The spec (to me) reads as `"value": { "html": "…", "value": "…" }`, but that microformats2-json wiki page documents the behavior exhibited by existing parsers of flattening `"html": "…", "value": "…"` .
#sknebelI think the "reuse" is meant to refer to the new {} opened
#ZegnatIt is there to make the JSON format possibly more clear. So people can graps just the JSON format without having to read how a parser comes to that result
#ZegnatJust like the JSON Schema and the object Validator linked in the See Also section of that page
#ZegnatNot sure what edge case there is for nested e-* objects though..?
#[jgarber]The delta between my interpretation of the parsing specification with regards to determining the `value` key’s value vs. existing parser implementations and what’s documented on the microformats2-json wiki page.
#[jgarber]I’m happy to put a pin in this one. Between the parsing spec, the microformats2-json wiki page, and existing implementations, there’s enough consensus for me.
#ZegnatI may have written the json page based on the parsers. Could still be the parsers are wrong, hehe.
#[jgarber]But they’re all equally wrong which is… consensus!
#sknebel[jgarber]: if you can come up with a good rewording of that section so that you'd have understood it as the parsers do, an editorial change there might make sense
#ZegnatI should have an actual output example of the e-* property on the -json page, maybe.
#Loqidocumentation has 1 karma in this channel over the last year (3 in all channels)
[aimee] joined the channel
#[aimee][tantek] no blog post yet, that’s something for the weekend perhaps. Was just happy to get it released
#[aimee][jgarber] yes and yes to feedback and help!
#[aimee]Also congratulations on your parser too [jgarber]. I originally went down the route of being opinionated to v2 but realised that v1 was a challenge so I did it 🤦♀️