Uploaded image for project: 'Apache Any23 (Retired)'
  1. Apache Any23 (Retired)
  2. ANY23-381

JsonParseException: Illegal unquoted character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.3
    • extractors
    • None

    Description

      While perusing the site http://losangeles.eventful.com/events I stumbled across the following exception:

      org.eclipse.rdf4j.rio.RDFParseException: Could not parse JSONLD
      	at org.eclipse.rdf4j.rio.jsonld.JSONLDParser.parse(JSONLDParser.java:77)
      	at org.apache.any23.extractor.rdf.BaseRDFExtractor.run(BaseRDFExtractor.java:196)
      	... 36 more
      Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
       at [Source: (BufferedReader); line: 1, column: 147]
      	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804)
      	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:663)
      	at com.fasterxml.jackson.core.base.ParserMinimalBase._throwUnquotedSpace(ParserMinimalBase.java:627)
      	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._finishString2(ReaderBasedJsonParser.java:2045)
      	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._finishString(ReaderBasedJsonParser.java:2016)
      	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.getText(ReaderBasedJsonParser.java:278)
      	at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:672)
      	at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
      	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
      	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
      	at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3972)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2264)
      	at com.fasterxml.jackson.core.JsonParser.readValueAs(JsonParser.java:1729)
      	at com.github.jsonldjava.utils.JsonUtils.fromJsonParser(JsonUtils.java:196)
      	at com.github.jsonldjava.utils.JsonUtils.fromReader(JsonUtils.java:173)
      	at com.github.jsonldjava.utils.JsonUtils.fromInputStream(JsonUtils.java:154)
      	at com.github.jsonldjava.utils.JsonUtils.fromInputStream(JsonUtils.java:111)
      	at org.eclipse.rdf4j.rio.jsonld.JSONLDParser.parse(JSONLDParser.java:71)
      	... 37 more
      

      caused by the description field in the following json spanning multiple unescaped newlines:

        {
          "@context": "http://schema.org",
          "@type": "Event",
          "name": "#1 Magic Show in L.A.",
          "description": "#1 MAGIC SHOW IN L.A.
      The current WINNER of the CW’s Penn & Teller’s FOOL US, Illusionist extraordinaire Ivan Amodei is on a national tour with his show INTIMATE ILLUSIONS. 
      
      Currently, on an ei...",
          "startDate": "Saturday, August 11, 2018  4:00 PM",
          "image": "//d1marr3m5x4iac.cloudfront.net/images/perspectivecrop373by249/I0-001/040/358/185-9.png_/1-magic-show-la-85.png",
          "location": {
            "@type": "Place",
            "name": "Beverly Wilshire Hotel",
            "url": "//losangeles.eventful.com/venues/beverly-wilshire-hotel-/V0-001-003541383-4",
            "address": {
              "streetAddress": "9500 Wilshire Boulevard",
              "addressLocality": "Beverly Hills",
              "addressRegion": "California",
              "postalCode": "90212"
            }
          },
          "offers": {
            "@type": "Offer",
            "url": "//losangeles.eventful.com/events/1-magic-show-la-/E0-001-114704991-1/tickets",
            "availability": "http://schema.org/InStock"
          },
          "performer": [        {
                "@type": "Person",
                "name": "Ivan Amodei"
              }    ]
        }
      

      Attachments

        Issue Links

          Activity

            People

              hansbrende Hans Brende
              hansbrende Hans Brende
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: