Skip to main content

parse_claims

Function parse_claims 

Source
pub fn parse_claims(json: &Value, patent_id: &str) -> PatentClaims
Expand description

Parse a claims response. EPO’s shape:

ops:world-patent-data.ftxt:fulltext-documents.ftxt:fulltext-document.claims
  .@lang             // language tag
  .claim             // single object or array
    .@id             // "claim001" (optional)
    .@num            // "0001" (optional)
    .claim-text      // string, object with `$`, or array

claim-text can carry inline formatting (italics, subscripts, math formulas) as nested elements; this parser flattens them to plain text. If formatting matters for your downstream, walk the raw JSON yourself.