cmoncrawl.aggregator.utils.ndjson_decoder.Decoder.raw_decode — CmonCrawl 1.0.0 documentation

Toggle navigation sidebar
Toggle in-page Table of Contents

# cmoncrawl.aggregator.utils.ndjson_decoder.Decoder.raw_decode

Decoder.raw_decode(s, idx=0)

  Decode a JSON document from `s` (a `str` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in `s` where the document ended.

  This can be used to decode a JSON document from a string that may have extraneous data at the end.