Add JSON Feed 1.0 and 1.1 parsing - #66
Conversation
Let importers consume JSON Feed 1.0 and 1.1 through the existing parser, fetcher, and normalized entry interface. Preserve source metadata and extensions while recovering optional date and attachment number errors. Keep XML parsing and serialization compatible. Document required-field errors, author inheritance, raw JSON snapshots, and object export rules. Verify format parity, local HTTP behavior, and the shared digest example. Closes #60
|
@greptileai Please review current head |
|
Reviewed both batches of Hound style threads against |
Greptile SummaryAdds JSON Feed 1.0 and 1.1 support while preserving the existing RSS and Atom interfaces.
Confidence Score: 5/5The PR appears safe to merge; both previous findings are resolved and no new actionable issue remains. The expiration field now rejects every supplied non-boolean value while preserving true, false, and absence correctly. JSON normalization also uses independent guard clauses rather than nesting the JSON path, fully addressing the prior conditional-structure concern. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SimpleRSS.parse or fetch] --> B{JSON-like body?}
B -->|No| C[Existing XML parser]
B -->|Yes| D[Parse and validate JSON Feed]
D --> E[Preserve immutable raw JSON]
D --> F[Build compatibility item view]
F --> G[Normalize entries]
G --> H[Resolve URLs and authors]
G --> I[Parse dates and attachments]
G --> J[Return immutable NormalizedEntry]
Reviews (2): Last reviewed commit: "fix: validate JSON Feed expiration flags" | Re-trigger Greptile |
Reject non-boolean expiration values so a string such as "false" cannot be mistaken for an expired feed. Preserve false in raw and serialized metadata and cover malformed values with a regression test. Flatten JSON normalization guards to follow the repository style.
|
@greptileai Please review current head |
Add JSON Feed 1.0 and 1.1 to
SimpleRSS.parseandSimpleRSS.fetch, so an importer can consume RSS, Atom, and JSON throughnormalized_entries. JSON feeds previously failed at the XML parser guard.Closes #60. Based on latest
masterat99e0882, including #65.Example: parse and normalize JSON Feed
The same consumer works for all three formats:
Fetching and source preservation
SimpleRSSErrorand a field path. Invalid optional dates/numbers remain raw and produce normalized issues; no IDs or dates are invented.raw_jsonand each normalized entry'sraw;raw_xmlis nil. UTF-8 input accepts one initial BOM before whitespace.to_jsonis an object export, not a standards exporter; JSONto_xmlfails explicitly. XML-only normalization mappings are rejected for JSON.Validation
Poorly formatted feederror, then passed after implementation.