third_party/blink/tools/blinkpy/web_tests/merge_results.py
def load_jsonp(fd):
        """Load a JSONP file and return the JSON data parsed.

        JSONP files have a JSON data structure wrapped in a function call or
        other non-JSON data.
        """
        in_data = fd.read()

        begin = in_data.find(b'{')
        end = in_data.rfind(b'}') + 1

        before = in_data[:begin]
        data = in_data[begin:end]
        after = in_data[end:]

        # If just a JSON file, use json.load to get better error message output.
        if before == b'' and after == b'':
            fd.seek(0)
            json_data = json.load(fd)
        else:
            json_data = json.loads(data)

        return before, json_data, after
Load a JSONP file and return the JSON data parsed.

        JSONP files have a JSON data structure wrapped in a function call or
        other non-JSON data.
        
Load a JSONP file and return the JSON data parsed.
JSONP files have a JSON data structure wrapped in a function call or
other non-JSON data.
Load a JSONP file and return the JSON data parsed . JSONP files have a JSON data structure wrapped in a function call or other non - JSON data .
def load_jsonp(fd):
        in_data = fd.read()
        begin = in_data.find(b'{')
        end = in_data.rfind(b'}') + 1
        before = in_data[:begin]
        data = in_data[begin:end]
        after = in_data[end:]
        if before == b'' and after == b'':
            fd.seek(0)
            json_data = json.load(fd)
        else:
            json_data = json.loads(data)
        return before, json_data, after
def load_jsonp ( fd ) : in_data = fd . read ( ) begin = in_data . find ( b'{' ) end = in_data . rfind ( b'}' ) + 1 before = in_data [ : begin ] data = in_data [ begin : end ] after = in_data [ end : ] if before == b'' and after == b'' : fd . seek ( 0 ) json_data = json . load ( fd ) else : json_data = json . loads ( data ) return before , json_data , after
Load a JSONP file and return the JSON data parsed.
Load a JSONP file and return the JSON data parsed .
"""Load a JSONP file and return the JSON data parsed.

        JSONP files have a JSON data structure wrapped in a function call or
        other non-JSON data.
        """ # If just a JSON file, use json.load to get better error message output.
fd