function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abhinav GuptaAbhinav Gupta 

Error parsing CrunchBase JSON for CTRL CHAR 11

I am making this callout to CrunchBase 

 

HttpRequest[Endpoint=http://api.crunchbase.com/v/1/search.js?query=square, Method=GET]

 

and getting this JSON Response and error, Seems I need to wipe out a bad char, but how to find the one ? how should I get rid of this one ? 

Also checked char location 26924 in VIM, its end of string.

 

16:47:53.321 (321102000)|FATAL_ERROR|System.JSONException: Illegal unquoted character ((CTRL-CHAR, code 11)): has to be escaped using backslash to be included in string value at input location [26,924]

 

16:47:53.237 (237876000)|USER_DEBUG|[6]|DEBUG|{"total": 253,
 "page": 1,
 "crunchbase_url": "http://www.crunchbase.com/search?query=square",
 "results":
  [{"name": "Square Enix North America",
    "permalink": "square-enix-north-america",
    "crunchbase_url": "http://www.crunchbase.com/company/square-enix-north-america",
    "namespace": "company",
    "overview": "Square Enix, Inc. develops, publishes, distributes and licenses SQUARE ENIX, EIDOS and TAITO branded entertainment content throughout the Americas as part of the Square Enix Group. The Square Enix Group operates a global network of leading development studios and boasts a valuable portfolio of intellectual property, including: FINAL FANTASY\u00ae, which has sold over 97 million units worldwide; DRAGON QUEST\u00ae, which has sold over 54 million units worldwide; TOMB RAIDER\u00ae, which has sold over 35 million units worldwide; and the legendary SPACE INVADERS\u00ae. Square Enix, Inc. is a U.S.-based, wholly-owned subsidiary of Square Enix Holdings Co., Ltd.",
    "image":
     {"available_sizes":
       [[[150,
          12],
         "assets/images/resized/0012/4564/124564v1-max-150x150.png"],
        [[250,
          21],
         "assets/images/resized/0012/4564/124564v1-max-250x250.png"],
        [[273,
          23],
         "assets/images/resized/0012/4564/124564v1-max-450x450.png"]],
      "attribution": null}},
   {"name": "D square nv",
    "permalink": "d-square-nv",
    "crunchbase_url": "http://www.crunchbase.com/company/d-square-nv",
    "namespace": "company",
    "overview": "D square assists plant management in the process industry to detect, analyze and solve\r\ncritical bottlenecks to reach and surpass even the most challenging production targets, through the combination of high-end business consultancy services and innovative and market leading data mining know-how, packaged as real-time software products enabling custom support and interaction for each operational role.\r\n\r\nD square embeds state-of-the-art data mining and statistical learning techniques into software appliances and tailored solutions for process performance optimization. The research and development roadmap is driven by a combination of domain knowledge and experience, partner contacts and service projects that act as a probe in the market. The company's strong research backbone includes research initiatives on plant monitoring that are funded by IWT Vlaanderen.\r\n\r\nD square is a spin-o company of K.U.Leuven and won in 2009 the award of \"best spin-o of the year\". It is currently developing a software suite to improve overall plant eciency and increase the current plant safety level.",
    "image":
     {"available_sizes":
       [[[130,
          150],
         "assets/images/resized/0011/0089/110089v2-max-150x150.jpg"],
        [[218,
          250],
         "assets/images/resized/0011/0089/110089v2-max-250x250.jpg"],
        [[344,
          394],
         "assets/images/resized/0011/0089/110089v2-max-450x450.jpg"]],
      "attribution": null}},
   {"name": "Square",
    "permalink": "square",
    "crunchbase_url": "http://www.crunchbase.com/company/square",
    "namespace": "company",
    "overview": "Square is a revolutionary service that enables anyone to accept credit cards anywhere. Square offers an easy to use, free credit card reader that plugs into a phone or iPad. It's simple to sign up. There is no extra equipment, complicated contracts, monthly fees or merchant account required.\r\n\r\nCo-founded by Jim McKelvey and Jack Dorsey in 2009, the company is headquartered in San Francisco with additional offices in Saint Louis and New York City.\r\n",
    "image":
     {"available_sizes":
       [[[130,
          34],
         "assets/images/resized/0006/8147/68147v15-max-150x150.png"],
        [[130,
          34],
         "assets/images/resized/0006/8147/68147v15-max-250x250.png"],
        [[130,
          34],
         "assets/images/resized/0006/8147/68147v15-max-450x450.png"]],
      "attribution": null}},
   {"name": "Genetics Squared",
    "permalink": "genetics-squared",
    "crunchbase_url": "http://www.crunchbase.com/company/genetics-squared",
    "namespace": "company",
    "overview": "Genetics Squared, Inc. provides solutions for personalized medicines in Michigan. The company focuses on offering life sciences solutions. Its Evolver technology, a machine learning technique that produces mathematical models that describe a dataset based on what specific questions are being asked about that dataset. The company\u2019s technology is applied in various areas of clinical and preclinical biomedical research, such as for clinical oncology, infectious disease, nephrology, and autoimmune disease. Genetics Squared, Inc. was founded in 2001 and is based in Ann Arbor, Michigan.\r\n",
    "image":
     {"available_sizes":
       [[[150,
          41],
         "assets/images/resized/0011/9606/119606v1-max-150x150.jpg"],
        [[250,
          69],
         "assets/images/resized/0011/9606/119606v1-max-250x250.jpg"],
        [[386,
          108],
         "assets/images/resized/0011/9606/119606v1-max-450x450.jpg"]],
      "attribution": null}},
   {"name": "Pay It Square, LLC",
    "permalink": "payitsquare-llc",
    "crunchbase_url": "http://www.crunchbase.com/company/payitsquare-llc",
    "namespace": "company",
    "overview": "Pay It Square helps people collect money from groups of friends.\r\n\r\nIt is ideal for:\r\n\r\n- Organizing a bachelor or bachelorette party.\r\n- Team managers who need to collect league dues.\r\n- Organizers collecting for group outings.\r\n- Collecting rent from roommates.\r\n- Buying a gift on behalf of a group.\r\n- Buying tickets to an event for a group of people.\r\n- Organizing a group vacation.\r\n- Collecting association dues.\r\n\r\nYou get the idea. People are constantly collecting these types of payments.  Pay It Square makes it easier.",
    "image":
     {"available_sizes":
       [[[150,
          26],
         "assets/images/resized/0005/7770/57770v2-max-150x150.jpg"],
        [[156,
          28],
         "assets/images/resized/0005/7770/57770v2-max-250x250.jpg"],
        [[156,
          28],
         "assets/images/resized/0005/7770/57770v2-max-450x450.jpg"]],
      "attribution": null}},
   {"name": "Kee Square",
    "permalink": "kee-square",
    "crunchbase_url": "http://www.crunchbase.com/company/kee-square",
    "namespace": "company",
    "overview": "Kee Square S.r.l., a spin-off company of the Politecnico di Milano, develops innovative techniques in video and audio signal processing for biometric identification and tracking, detection of hazardous events, and security applications in general.\r\n\r\nKee Square products are designed and customized to fulfill the Law Enforcement and Commercial Markets requirements. ",
    "image":
     {"available_sizes":
       [[[150,
          76],
         "assets/images/resized/0007/0993/70993v1-max-150x150.jpg"],
        [[250,
          126],
         "assets/images/resized/0007/0993/70993v1-max-250x250.jpg"],
        [[298,
          151],
         "assets/images/resized/0007/0993/70993v1-max-450x450.jpg"]],
      "attribution": null}},
   {"name": "Colton Square Business Park",
    "permalink": "colton-square-business-park",
    "crunchbase_url": "http://www.crunchbase.com/company/colton-square-business-park",
    "namespace": "company",
    "overview": "Where the city\u2019s past and future dovetail Colton Square is the cornerstone of Leicester\u2019s dramatic Business Quarter renaissance.\r\n\r\nThis unique development represents the fusion of the listed former police station on Charles Street with striking high profile contemporary office space. The result is breathtaking in its vision.\r\n\r\nNow complete and ready for occupation One and Two Colton Square provide corporates and professionals with the cachet of locating in the city\u2019s most prestigious and dramatic commercial address. No other business space in Leicester makes such a bold statement.",
    "image":
     {"available_sizes":
       [[[81,
          71],
         "assets/images/resized/0010/3576/103576v2-max-150x150.png"],
        [[81,
          71],
         "assets/images/resized/0010/3576/103576v2-max-250x250.png"],
        [[81,
          71],
         "assets/images/resized/0010/3576/103576v2-max-450x450.png"]],
      "attribution": null}},
   {"name": "SDP Squared, LLC",
    "permalink": "sdp-squared-llc",
    "crunchbase_url": "http://www.crunchbase.com/company/sdp-squared-llc",
    "namespace": "company",
    "overview": "SDP Squared was founded to help small businesses in the Maryland, Metro Baltimore and Southern New Jersey areas get the most out of their business technology. They provide affordable IT support services especially taylored for non-profits and small business companies.",
    "image":
     {"available_sizes":
       [[[137,
          76],
         "assets/images/resized/0006/8027/68027v2-max-150x150.jpg"],
        [[137,
          76],
         "assets/images/resized/0006/8027/68027v2-max-250x250.jpg"],
        [[137,
          76],
         "assets/images/resized/0006/8027/68027v2-max-450x450.jpg"]],
      "attribution": null}},
   {"name": "PE Squared",
    "permalink": "pe-squared",
    "crunchbase_url": "http://www.crunchbase.com/company/pe-squared",
    "namespace": "company",
    "overview": "PE SQUARED is a North Carolina Civil Engineering Firm licensed in North and South Carolina specializing in Land development services. We have a focus on sustainable site development practices that can be both economical and sustain the environment into the future. Additionally our services include floodplain studies, preliminary site analysis, cost estimating, and project management.",
    "image":
     {"available_sizes":
       [[[103,
          150],
         "assets/images/resized/0008/0163/80163v2-max-150x150.jpg"],
        [[103,
          150],
         "assets/images/resized/0008/0163/80163v2-max-250x250.jpg"],
        [[103,
          150],
         "assets/images/resized/0008/0163/80163v2-max-450x450.jpg"]],
      "attribution": null}},
   {"name": "Jackson Square Group",
    "permalink": "jackson-square-group",
    "crunchbase_url": "http://www.crunchbase.com/company/jackson-square-group",
    "namespace": "company",
    "overview": "Jackson Square Group is a market research technology firm. Based in New Orleans, the firm creates technologies that maximize the efficiency and effectiveness of gathering data and intelligence from consumer markets.",
    "image":
     {"available_sizes":
       [[[150,
          150],
         "assets/images/resized/0009/9935/99935v2-max-150x150.png"],
        [[250,
          250],
         "assets/images/resized/0009/9935/99935v2-max-250x250.png"],
        [[300,
          300],
         "assets/images/resized/0009/9935/99935v2-max-450x450.png"]],
      "attribution": null}}]}

16:47:53.321 (321102000)|FATAL_ERROR|System.JSONException: Illegal unquoted character ((CTRL-CHAR, code 11)): has to be escaped using backslash to be included in string value at input location [26,924]

 

16:47:53.098 (98603000)|CALLOUT_REQUEST|[130]|System.HttpRequest[Endpoint=http://api.crunchbase.com/v/1/search.js?query=square, Method=GET]

16:47:53.098 (98603000)|CALLOUT_REQUEST|[130]|System.HttpRequest[Endpoint=http://api.crunchbase.com/v/1/search.js?query=square, Method=GET]

spraetzspraetz

It's probably freaking out about this text  block:

 

"overview": "D square assists plant management in the process industry to detect, analyze and solve\r\ncritical bottlenecks to reach and surpass even the most challenging production targets, through the combination of high-end business consultancy services and innovative and market leading data mining know-how, packaged as real-time software products enabling custom support and interaction for each operational role.\r\n\r\nD square embeds state-of-the-art data mining and statistical learning techniques into software appliances and tailored solutions for process performance optimization. The research and development roadmap is driven by a combination of domain knowledge and experience, partner contacts and service projects that act as a probe in the market. The company's strong research backbone includes research initiatives on plant monitoring that are funded by IWT Vlaanderen.\r\n\r\nD square is a spin-o company of K.U.Leuven and won in 2009 the award of \"best spin-o of the year\". It is currently developing a software suite to improve overall plant eciency and increase the current plant safety level.",



It's probably upset about the \ or ' that is present in there.